Skip to content

"providers" field in "raw_app_meta_data" in auth.users table does not contain "email" #1698

@GA1

Description

@GA1

Bug report

✅ I confirm this is a bug with Supabase, not with my own application.
✅ I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I use google auth app locally as my only social sign in
My app has been working correctly for months with google sign in only. I have a sign in screen that correctly redirects me to google sign in page, after which I am redirected back to my app again.
I am trying to add sign up/in by email to my local supabase instance before I enable it in production.

To Reproduce

      const { data, error } = await getSupabaseClient().auth.signInWithOtp({
        email: 'my.private.email@gmail.com',
        options: {
          shouldCreateUser: true,
          emailRedirectTo: 'https://example.com/welcome',
        },
      })

    "raw_app_meta_data": {
      "provider": "google",
      "providers": [
        "google"
      ]
    },

note that if I reverse the order (first signup with magic link and then sign in with google) the object does look correctly:

    "raw_app_meta_data": {
      "provider": "email",
      "providers": [
        "email",
        "google"
      ]
    },

Expected behavior

the column raw_app_meta_data should have:

    "raw_app_meta_data": {
      "provider": "email",
      "providers": [
        "google",
        "email"
      ]
    },

System information

  • OS: MAC
  • Version of supabase cli 1.183.5
  • Version of supabase-js: 2.45.2
  • Version of Node.js: v20.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    auth-jsRelated to the auth-js library.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions