lib/generators/rodauth/oauth/templates/db/migrate/create_rodauth_oauth.rb in rodauth-oauth-0.7.4 vs lib/generators/rodauth/oauth/templates/db/migrate/create_rodauth_oauth.rb in rodauth-oauth-0.8.0
- old
+ new
@@ -9,18 +9,24 @@
t.string :redirect_uri, null: false
t.string :client_id, null: false, index: { unique: true }
t.string :client_secret, null: false, index: { unique: true }
t.string :scopes, null: false
t.datetime :created_at, null: false, default: -> { "CURRENT_TIMESTAMP" }
+ # JWT/OIDC per application signing verification
+ # t.text :jwt_public_key, null: true
+ # t.text :jws_jwk, null: true
+ # RP-initiated logout
+ # t.string :post_logout_redirect_uri, null: false
end
create_table :oauth_grants do |t|
t.integer :account_id
t.foreign_key :accounts, column: :account_id
t.integer :oauth_application_id
t.foreign_key :oauth_applications, column: :oauth_application_id
t.string :code, null: false
+ t.index(%i[oauth_application_id code], unique: true)
t.datetime :expires_in, null: false
t.string :redirect_uri
t.datetime :revoked_at
t.string :scopes, null: false
t.datetime :created_at, null: false, default: -> { "CURRENT_TIMESTAMP" }
@@ -29,10 +35,12 @@
# uncomment to enable PKCE
# t.string :code_challenge
# t.string :code_challenge_method
# uncomment to use OIDC nonce
# t.string :nonce
- t.index(%i[oauth_application_id code], unique: true)
+ # device code grant
+ # t.string :user_code, null: true, unique: true
+ # t.datetime :last_polled_at, null: true
end
create_table :oauth_tokens do |t|
t.integer :account_id
t.foreign_key :accounts, column: :account_id
\ No newline at end of file