-
Notifications
You must be signed in to change notification settings - Fork 142
Setup Auth0 App
Geremia Taglialatela edited this page Aug 25, 2023
·
11 revisions
An Auth0 account
- Login to https://auth0.com/
- Click on the top-left menu dropdown -> Create tenant
- Fill in Tenant Domain with your app's name (e.g.,
myicare
), select an appropriate Region, and click on Create - Click on Applications -> Applications on the left sidebar to expand Applications submenu
- You should already see a "Default App", click on its name
- Fill in Name with the name of your choice (e.g.,
My Icare
) - Change Application Type to "Regular Web Application"
- Fill in Allowed Callback URLs with your application's callback URL (e.g.,
https://myicare.herokuapp.com/users/auth/auth0/callback
) - Fill in Allowed Web Origins with your application's base URL (e.g.,
https://myicare.herokuapp.com
) - Click on Save Changes, we are done!
- Login to https://auth0.com/
- On the left sidebar, choose Branding -> Universal Login
- Click on Advanced Options at the bottom of the page
- Select the Login tab
- Enable Customize Login Page
- Add the following at the end of
var lock =
assignment configuration:defaultADUsernameFromEmailPrefix: false, // This may be the last entry in the default configuration additionalSignUpFields: [{ name: "name", storage: "root", placeholder: "Name" }]
- Click on Save Changes
Ref:
By default Auth0 enables Google integration.
- Login to https://auth0.com/
- On the left sidebar, choose Connections -> Social
- Click the button with the three dots in the
google-oauth2
entry - Confirm by writing
google-oauth2
In Demo mode, we delete profiles on Auth0 provider for user privacy. You don't want this in a proper OAuth authentication flow, but if you need it, these are the steps to follow:
- Login to https://auth0.com/
- On the left sidebar, choose Applications -> APIs
- Click on Auth0 Management API
- Select Machine to Machine Applications tab
- Change your application name settings to Authorized
- Enable
delete:users
permission
We suggest you to create a separate application for the development environment.
-
Allowed Callback URLs is by default
http://localhost:3000/users/auth/auth0/callback
-
Allowed Web Origins is by default
http://localhost:3000
- Store your credentials in
config/settings/local.rb
or better in ENV variables referenced bylocal.rb
# Example config/settings/local.rb SimpleConfig.for :application do group :auth0 do set :domain, 'EXAMPLE-TENANT.REGION.auth0.com' set :client_id, 'EXAMPLE-CLIENT-ID' set :client_secret, 'EXAMPLE-CLIENT-SECRET' end end