You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no other issue that already describes my problem.
Describe the Bug
Once I upgraded to rc.100, I was no longer able to sign in to existing accounts that only had Google oAuth credentials. The only workaround I've found is to change the user's email, log in creating a new user (with public registration enabled), and then copy the external ID into the old user row in the database before deleting the new user.
To Reproduce
From Directus pre-rc.99, create a user with valid Google credentials.
Upgrade to rc.100.
Attempt to log in with the same Google account.
Errors Shown
The app redirects to /admin/login?reason=UNKNOWN_EXCEPTION, and prior to that outputs the following error:
Error: Field "email" has to be unique.
at UsersService.checkUniqueEmails (/app/node_modules/directus/dist/services/users.js:52:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async UsersService.createMany (/app/node_modules/directus/dist/services/users.js:117:13)
at async UsersService.createOne (/app/node_modules/directus/dist/services/users.js:107:24)
at async OpenIDAuthDriver.getUserID (/app/node_modules/directus/dist/auth/drivers/openid.js:108:9)
at async AuthenticationService.login (/app/node_modules/directus/dist/services/authentication.js:66:26)
at async /app/node_modules/directus/dist/auth/drivers/openid.js:203:28
What version of Directus are you using?
v9.0.0-rc.100
What version of Node.js are you using?
14.13.1
What database are you using?
Postgres 13
What browser are you using?
Firefox
What operating system are you using?
macOS
How are you deploying Directus?
Heroku
The text was updated successfully, but these errors were encountered:
The jump to rc99 was a breaking change for the OAuth flow, I'm afraid. We added a field to users called provider which links users to certain auth flows. So your old users are now considered regular users, when you need them to be oauth users.
If you plan on using public registration you will run into this issue, since the login will try and create a new user with the same email address when it can't find an oauth user.
I assume you're using the openid driver? If that is the case you can:
Set AUTH_<your_google_provider>_IDENTIFIER_KEY="email"
Update all OAuth users in the database so that provider=<your_google_provider> and external_identifier=<users_email>
Then the openid driver should be able to find users by email and authenticate them.
Preflight Checklist
Describe the Bug
Once I upgraded to rc.100, I was no longer able to sign in to existing accounts that only had Google oAuth credentials. The only workaround I've found is to change the user's email, log in creating a new user (with public registration enabled), and then copy the external ID into the old user row in the database before deleting the new user.
To Reproduce
Errors Shown
The app redirects to
/admin/login?reason=UNKNOWN_EXCEPTION
, and prior to that outputs the following error:What version of Directus are you using?
v9.0.0-rc.100
What version of Node.js are you using?
14.13.1
What database are you using?
Postgres 13
What browser are you using?
Firefox
What operating system are you using?
macOS
How are you deploying Directus?
Heroku
The text was updated successfully, but these errors were encountered: