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

Data Not Being Sent When Using supabase.auth.signInWithOtp #246

Closed
rlee1990 opened this issue Oct 20, 2022 · 19 comments
Closed

Data Not Being Sent When Using supabase.auth.signInWithOtp #246

rlee1990 opened this issue Oct 20, 2022 · 19 comments
Labels
auth This issue or pull request is related to authentication bug Something isn't working

Comments

@rlee1990
Copy link

When trying to using the supabase.auth.signInWithOtp for Magic link along with passing user data. the data is sent as null.

await supabase.auth.signInWithOtp(
              email: email,
              emailRedirectTo: kIsWeb
                  ? null
                  : 'com.socialjawn.supabase.test://login-callback/',
              data: {
                'firstname': _firstName!.trim(),
                'lastname': _lastName!.trim(),
                'username': username!.trim(),
                'gender': _gender!.trim(),
                'pronoun': _pronoun!.trim(),
                'dateofbirth': bday!.toIso8601String(),
              },
            );

I am using version 1.0
Using a Pixel 7 Pro

[✓] Flutter (Channel stable, 3.3.5, on macOS 12.6 21G115 darwin-arm, locale
    en-US)
    • Flutter version 3.3.5 on channel stable at
      /Users/rickeylee/Desktop/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d9111f6402 (24 hours ago), 2022-10-19 12:27:13 -0700
    • Engine revision 3ad69d7be3
    • Dart version 2.18.2
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version
    33.0.0-rc1)
    • Android SDK at /Users/rickeylee/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc1
    • ANDROID_HOME = /Users/rickeylee/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.72.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (5 available)
    • Pixel 7 Pro (mobile)         • 28181FDH300KGN                           • android-arm64  • Android 13 (API 33)
    • SM N950U (mobile)            • ce061716d1923703017e                     • android-arm64  • Android 9 (API 28)
    • rickey lee’s iPhone (mobile) • d0545eb2ff26e1c087d1b29c26f8e15da19284bb • ios            • iOS 16.0 20A362
    • macOS (desktop)              • macos                                    • darwin-arm64   • macOS 12.6 21G115 darwin-arm
    • Chrome (web)                 • chrome                                   • web-javascript • Google Chrome 106.0.5249.119

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
@rlee1990 rlee1990 added the bug Something isn't working label Oct 20, 2022
@Vinzent03
Copy link
Collaborator

Hey, Vinzent from the Discord here ;). @dshukertjr I can't find the data parameter in the javascript sdk. So the data parameter is wrong here?

@dshukertjr
Copy link
Member

@Vinzent03
It seems like they do have data as the parameter of signInWithOtp on the js sdk as well.

signInWithOtp takes a SignInWithPasswordlessCredentials, which contains data.

I just tried calling signInWithOtp with passing some data using the js client, and the meta data was not saved on the users table, so it might be a server side issue.
I have reopened the issue on gotrue here

@dshukertjr dshukertjr added the auth This issue or pull request is related to authentication label Oct 21, 2022
@rlee1990
Copy link
Author

@dshukertjr with supabase/auth#764 being fixed will that fix the issue here?

@dshukertjr
Copy link
Member

@rlee1990 Yup, good call!

@rlee1990
Copy link
Author

@dshukertjr that didn't fix the issue. I still have a null metadata on my trigger function and in the log.

@dshukertjr
Copy link
Member

It might not been released to all prod instances yet. Give it a few days.

@rlee1990
Copy link
Author

@dshukertjr it's still not working

@dshukertjr
Copy link
Member

@rlee1990
Could you retry again? I just tried it on my project, and it worked.

One thing to note here

One caveat though: If the user has already signed up, you can't use the data param to update the user_metadata field. The user will have to update it using the updateUser method in gotrue-js

@rlee1990
Copy link
Author

@rlee1990 Could you retry again? I just tried it on my project, and it worked.

One thing to note here

One caveat though: If the user has already signed up, you can't use the data param to update the user_metadata field. The user will have to update it using the updateUser method in gotrue-js

No it still is not working when I log the raw_user_meta_data in my trigger function it is still empty. The trigger is called on insert to the auth user table.

@rlee1990
Copy link
Author

Also this is a new user that is not in the system. @dshukertjr

@dshukertjr
Copy link
Member

@rlee1990
In that case, since it's a server side issue, could you email support@supabase.com with your project reference? Our auth team will make sure to take a look at your Supabase instance.

@hf
Copy link

hf commented Oct 28, 2022

@rlee1990 Releases in GoTrue are not immediately applied to projects. It takes about 1-2 weeks for changes to end up in all projects. The release 2.19.4 that includes the change is not deployed and is currently blocked due to an unforeseen issue. We expect it to go live next week.

@rlee1990
Copy link
Author

Thanks

@rlee1990
Copy link
Author

rlee1990 commented Nov 2, 2022

@rlee1990 Releases in GoTrue are not immediately applied to projects. It takes about 1-2 weeks for changes to end up in all projects. The release 2.19.4 that includes the change is not deployed and is currently blocked due to an unforeseen issue. We expect it to go live next week.

@hf is there anything for me to track so I know when this has been deployed?

@rlee1990
Copy link
Author

rlee1990 commented Nov 4, 2022

@hf Anything? Its a week later and it's still not working.

@rlee1990
Copy link
Author

rlee1990 commented Nov 7, 2022

@hf @dshukertjr can I get an update on this? It's holding up development.

@hf
Copy link

hf commented Nov 7, 2022

@hf @dshukertjr can I get an update on this? It's holding up development.

Hey, the release was held up particularly long this past week due to numerous issues (not all connected to Auth). We plan on rolling out version 2.25.1 tomorrow.

@rlee1990
Copy link
Author

rlee1990 commented Nov 7, 2022

Thanks for the update.

@rlee1990
Copy link
Author

rlee1990 commented Nov 8, 2022

Thanks look like the update went live and everything is working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth This issue or pull request is related to authentication bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants