Back

user_email_already_exists

  • 0
  • Users
  • Accounts
Infinil
1 Nov, 2023, 17:28

I am trying to login with xyz@gmail.com via discord provider but i get the error code 409. I have checked auh and i don't see any user registered with that email.

TL;DR
User is experiencing an error code 409 when trying to login with their email via the Discord provider. They have checked the authentication and no user is registered with that email. They are wondering why this error is occurring and if it is intended behavior. Solution: The user needs to first log in and then create an OAuth2 session with Discord to link their email to the Discord identity. This will create a new Discord identity linked to their user account. They may have multiple identities, one for Google and another for Discord.
Infinil
1 Nov, 2023, 17:28

<#1166597978107158548> already facing other issues here

Infinil
1 Nov, 2023, 17:29

also if i try to login with xyz@gmail.com via google provider then it works

Infinil
1 Nov, 2023, 17:30

even if its due to an identity being created for diff user why is this error shown with discord provider

Infinil
1 Nov, 2023, 17:35

wait is this also an intended behavior ??

Drake
1 Nov, 2023, 17:59

yes, the user will need to link the discord identity first

Infinil
1 Nov, 2023, 18:00

but thats not possible right

Infinil
1 Nov, 2023, 18:00

because xyz@gmail.com is linked to another user via google provider

Infinil
1 Nov, 2023, 18:00

or u mean smth else

Drake
1 Nov, 2023, 18:03

it is possible. it's possible to have multiple identities with the same email.

the user would need to log in first and then create an oauth2 session with discord. that will create a new discord identity linked to the user. They'll then have 2 identities: one for google and another for discord.

Infinil
1 Nov, 2023, 18:04

so the user needs to have session for xyz@gmail.com via google provider

Infinil
1 Nov, 2023, 18:05

and then create the discord oauth session?

Infinil
1 Nov, 2023, 18:05

or if u mean no session should exist then i get user_email_already_exists error

Drake
1 Nov, 2023, 18:08

they need to already have a session

Infinil
1 Nov, 2023, 18:14

isnt this unintuitive for the user .. like if they log out from app then by default they will think that any oauth provider + account combo should work?

Infinil
1 Nov, 2023, 18:14

or maybe giving devs an alternate option to have 1 identity max per user in auth?

Drake
1 Nov, 2023, 18:22

it's a trade-off

Infinil
1 Nov, 2023, 18:24

i understand.. should i make a feature request for the latter because then no extra identities will be linked to user right + devs will have more freedom?

Drake
1 Nov, 2023, 18:28

you could...but i would suggest showing the user an error and maybe telling them to use the same provider before. In addition, you may want to build out a screen that allows users to connect accounts

Infinil
1 Nov, 2023, 18:30

yes i can do that but then again there is <#1166597978107158548>in which browser session can go undetected and can lead to problems client sided like i wont be able to display the screen

Infinil
1 Nov, 2023, 18:31

also at starting as a dev u might not wanna waste time on building a complex oauth.. tho yea it can be beneficial to implement it later on

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