Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not login after adding two auth providers which use same emails #696

Open
eposha opened this issue Nov 26, 2023 · 4 comments
Open
Labels
bug Something isn't working

Comments

@eposha
Copy link

eposha commented Nov 26, 2023

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:

  1. Init supabase starter
  2. Add github and bitbucker auth providers
  3. Sign in with github
  4. Logout
  5. Sign in with bitbucket what has same email as github
  6. See not auth and see cookies name has '.1' at the end

Expected behavior

User must be authorized

Screenshots

image

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

@grieblius
Copy link

@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 ?

@eposha
Copy link
Author

eposha commented Nov 29, 2023

@grieblius exactly

Only when user has some Cyrillic I see this issues

@nikitastryuk
Copy link

same
up, pls

@eposha
Copy link
Author

eposha commented Dec 16, 2023

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants