Login issues with two accounts

Hi, I’m doing the React Quickstart course (https://auth0.com/docs/quickstart/spa/react/01-login). I’m doing everything as per the tutorial, but getting back Unauthorized when logging in with my gmail account .
I’ve also tried creating a new Auth0 specific account, where it’s saying “wrong username/password” upon trying to login. It works fine when I try to login to the Auth0 management.

This is when using the sample app from github.

Can anyone advise please?

PS: I’ve also noticed that the password reset doesn’t work with either of the accounts. The logs in admin are showing Failed: the user doesn’t exist - so the user that was just used to log into the admin dashboard to view these logs (?)

Hi @driznar!

Welcome to the Community!

I’m doing everything as per the tutorial, but getting back Unauthorized when logging in with my gmail account.

To make sure I understand, when you log in to your sample app with your gmail account, you are using the Google social connection, correct (“Sign in with Google”)?

I’ve also tried creating a new Auth0 specific account, where it’s saying “wrong username/password” upon trying to login. It works fine when I try to login to the Auth0 management.

To create a new account, did you use the “Sign Up” tab and enter in an email/password?

1 Like

Hi Stephanie,

Yes, that’s a “yes” for all of the questions.

Ah okay! Thanks for confirming.

Hm, I haven’t been able to reproduce the issue.

Do you have an audience configured in the auth_config.json file with an API you have set up in your Auth0 dashboard (the Management API will work for this: https://YOUR_DOMAIN/api/v2/)?

Also, have you tried manually creating a user from your Auth0 dashboard and then signing in with it in your app (Users & Roles > Users)?

1 Like

Stephanie,

I’ve just tried both of your suggestions and neither worked. I’ve deleted the existing, created a new one (a regular user/password not google connection), and still getting the same Unauthorized message back; it’s actually “Oops… Unauthorized”.

The app does show up under the Authorized applications, but Roles/Permissions section is empty though.

Apologies for the delayed response!

This might be happening due to the application settings. The React QuickStart is for Single Page Applications that use an appropriate grant type. You can view the application type and grant types from within the application settings in the dashboard.

Application Type:

Grant Type (show advanced settings to see):

I’m not sure if you set up your application directly from the docs or within your dashboard. Using the dashboard would be the easiest way to make sure all of the settings are right for a React SPA.

To do a Quick Start from your dashboard, click Applications and then select “+ Create Application” and then select Single Page Application, and finally click React.

If you download the sample application from the React Quickstart, your application settings will already be included in the code. The only dashboard configuration required is to add http://localhost:3000/ to the application’s “Allowed Callback URLs,” “Allowed Logout URLs,” and “Allowed Web Origins” for the app. You can unzip the file and run npm install && npm start from the project directory (sample-01).

1 Like

Hi Stepanie,

after having recreated the app and set it to SPA it’s working now. Really appreciate your help, cheers!

Cheers,
Dani

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.