Auth0 Registration and Login

To create a new account for my software, users signup through a page within our app. We wanted to keep this here to ensure we added some business logic around signing up (instead of using the user signup hosted page on auth0).

After the user signs up, I wanted to create their user account via ruby api (working), then log them right into the app, so they can immediately get started using our tool.

I am trying to create the user, then log them in with the ruby API, so I can pass this token back to my frontend for ongoing use and it’s not working.

Getting this error:
Auth0::Unauthorized ({“error”:“access_denied”,“error_description”:“Unauthorized”})

On ruby side:
client.login(‘username’, ‘password’)

I have triple checked that the credentials are correct and work through the auth0 hosted login page.

  1. What am I doing wrong
  2. Is there a better way to create a user and return the token?
  3. I tried this on the frontend and got an error about grant_types

The goal here is to have the user use my app’s registration form, then create a user on auth0, and sign them right into our app.

Any help or recommendations on either how to best do this, or how to fix the issue with the Ruby library so I can get the users access_token would be much appreciated.

Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?