janko / rodauth-omniauth

OmniAuth login and registration for Rodauth authentication framework
MIT License
55 stars 3 forks source link

Is there a way to provider a different table name than `account_identities`? #1

Closed chika-kasymov closed 2 years ago

chika-kasymov commented 2 years ago

I've got two rodauth configurations with different tables. For that reason, I need to create two X_account_identities tables as well. It'll be great if there is a way to add a prefix or provide a completely different table name.

janko commented 2 years ago

Yes, you can set omniauth_identities_table in your Rodauth configuration, e.g:

class RodauthAdmin < Rodauth::Auth
  configure do
    omniauth_identities_table :admin_identities
  end
end

I see now that I forgot to document it, I'll add that.

chika-kasymov commented 2 years ago

That's awesome! In my case, I also needed to customize the omniauth_identities_account_id_column and that resolved my issue. Thanks for your help!