Could not login after adding two auth providers which use same emails
eposha opened this issue · comments
Bug report
- [ x] I confirm this is a bug with Supabase, not with my own application.
- [ x] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Init supabase starter
- Add github and bitbucker auth providers
- Sign in with github
- Logout
- Sign in with bitbucket what has same email as github
- See not auth and see cookies name has '.1' at the end
Expected behavior
User must be authorized
Screenshots
![image](https://private-user-images.githubusercontent.com/54452472/285627409-56bd8f85-9df6-408e-bed0-5ecad1eed932.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxMzQzODcsIm5iZiI6MTcyMjEzNDA4NywicGF0aCI6Ii81NDQ1MjQ3Mi8yODU2Mjc0MDktNTZiZDhmODUtOWRmNi00MDhlLWJlZDAtNWVjYWQxZWVkOTMyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI4VDAyMzQ0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWExMGE3NmY4N2ZiOWZiMmY5N2I5M2NhYTRlMThkOGEzOWViYzQ3NzMyYjNhN2YyZTkxN2Y4MmZhNGEyNDc1MjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-YNfKnVTxKAUEm-Y6PHMsGHS3j3JOJtiEqfZv1iI_Gk)
System information
- OS: macOS
- Browser chrome
- Version of supabase-js: 2.38.5
- Version of @supabase/ssr: 0.0.10",
- Version of Node.js: 20.9.0
Additional context
Similar issues but without answer #574
@eposha, does your social provider account names contain any Cyrillic or special characters?
My app users experienced the same problem but not all - only those, who contained Cyrillic characters in Google account name or surname.
It all started after upgrade to @supabase/ssr: 0.0.10
.
Behavior:
User, who previously logged in with Google and which Google account name/surname contains Cyrillic characters can now longer login. Seems authentication actions is performed successfully, but cookie is set ...-auth-token.1
.
Such user, who previously logged in to Google, can no longer login with any method (magic link, etc.). Seems that it is due raw_user_meta_data
contains Cyrillic characters.
After rollback to @supabase/auth-helpers-nextjs
sign in works again correctly.
Not sure, but cookie is quite large, maybe it is related with #643 ?
@grieblius exactly
Only when user has some Cyrillic I see this issues
same
up, pls
@eposha, does your social provider account names contain any Cyrillic or special characters? My app users experienced the same problem but not all - only those, who contained Cyrillic characters in Google account name or surname.
It all started after upgrade to
@supabase/ssr: 0.0.10
.Behavior: User, who previously logged in with Google and which Google account name/surname contains Cyrillic characters can now longer login. Seems authentication actions is performed successfully, but cookie is set
...-auth-token.1
.Such user, who previously logged in to Google, can no longer login with any method (magic link, etc.). Seems that it is due
raw_user_meta_data
contains Cyrillic characters.After rollback to
@supabase/auth-helpers-nextjs
sign in works again correctly.Not sure, but cookie is quite large, maybe it is related with #643 ?
Yes