react-native
version < 0.63Tip: Use the "Sign Up" method and pass in the user's email/phone to differentiate new and existing user. You can have an input text and collect the user's email/phone.
Tip: Use the "Log In" method to login or register user on the same page
cotter.signUpWithEmailLink
cotter.signUpWithEmailOTP
cotter.signInWithEmailLink
cotter.signInWithEmailOTP
cotter.signUpWithPhoneLink
cotter.signUpWithPhoneOTP
cotter.signInWithPhoneLink
cotter.signInWithPhoneOTP
{phone: this.state.phone, channel: "SMS"}
{phone: this.state.phone, channel: "WHATSAPP"}
myexample://auth_callback
.://
) doesn't have an underscore or other special characters. To test it out, enter your Redirect URL here: https://jsfiddle.net/omd02jn5/βpath: ''
to every parent stack.onError
function that you pass in will receive 2 parameters: errorMessage
(string) and errorResponse
(object). The errorResponse
is an http response from attempt to verify the user's email/phone in Cotter's server.onSuccess
function that you pass in will receive a response
object that looks like this:identifier
, oauth_token
and user
. oauth_token
contains an access_token
that you can validate in your backend.user
contains the User object in Cotter, which includes a "Cotter User ID". You should associate your user with this Cotter User ID for reference.API_KEY_ID
is exposed to anyone inspecting your code. Here are some ways to prevent abuse: