supabase / auth-helpers

A collection of framework specific Auth utilities for working with Supabase.

Home Page:https://supabase.github.io/auth-helpers/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  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

@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