Back

Suggest specific account to use for signing in with OAuth

  • 0
  • Auth
  • Cloud
Bigrichardo
29 May, 2024, 21:49

With most OAuth providers you can add a specific account (email adress) as prefered account to use for the OAuth protocol. An example for Github: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps

I am creating an account in advance before triggering an OAuth login to trigger some validation checks on the email domain. Locked account creation for the client, only possible with server side combined with the create user endpoint. I would like to send the email with the Oauth function, is that possible?

TL;DR
Suggest using a specific account for signing in with OAuth. You can add a preferred account (email address) for the OAuth protocol. It is possible to create an account in advance before triggering an OAuth login to validate the email domain. Combine server-side and create user endpoint for locked account creation.
Bigrichardo
29 May, 2024, 21:51

This is the flow for Microsoft: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow There you can send a login_hint but also a domain_hint as well.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more