Skip to content
Geremia Taglialatela edited this page Feb 6, 2021 · 11 revisions

Prerequisites

An Auth0 account

Create a new Auth0 application

  1. Login to https://auth0.com/
  2. Click on the top-left menu dropdown -> Create tenant
  3. Fill in Tenant Domain with your app's name (e.g., myicare), select an appropriate Region, and click on Create
  4. Click on Applications on the left sidebar
  5. You should already see a "Default Application", click on its name
  6. Fill in Name with the name of your choice (e.g., My Icare)
  7. Change Application Type to "Regular Web Application"
  8. Fill in Allowed Callback URLs with your application's callback URL (e.g., http://myicare.herokuapp.com/users/auth/auth0/callback)
  9. Fill in Allowed Web Origins with your application's base URL (e.g., https://myicare.herokuapp.com)
  10. Click on Save Changes, we are done!

Add Name to Sign Up Form

  1. Login to https://auth0.com/
  2. On the left sidebar, choose Branding -> Universal Login
  3. Select the Login tab
  4. Enable "Customize Login Page"
  5. Add the following to the var lock = assignment configuration:
    defaultADUsernameFromEmailPrefix: false,
    additionalSignUpFields: [{
      name: "name",
      storage: "root",
      placeholder: "Name"
    }]
  6. Click on Save Changes

Ref:

Add Delete User permission (optional)

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:

  1. Login to https://auth0.com/
  2. On the left sidebar, choose Applications -> APIs
  3. Selecte Machine to Machine Applications tab
  4. Change your application name settings to Authorized
  5. Enable delete:users permission

Local Development

We suggest you to create a separate application for the development environment. Use localhost:3000 as App base URL. Put your credentials in config/settings/local.rb.

Clone this wiki locally