Auth0 Home Blog Docs

How to create sign up and login screen for react native?

api
login
react-native

#1

I want to create sign up and login screen for react native android app. I have created email and password for sign up screen and for login the user clicks on login button which navigates him to browser tab there user enters email and password.

I am using 2 requests

  1. GET -> for login -> https://auth0.com/docs/api/authentication#login

API Endpoint: https://YOUR_AUTH0_DOMAIN/authorize?response_type=token&client_id=client_id&redirect_uri=url

  1. POST -> for sign up -> https://auth0.com/docs/api/authentication#signup

API Endpoint: https://YOUR_AUTH0_DOMAIN/dbconnections/signup

In postman Body should be:

     "email":"xyzuser@gmail.com",
"password":"xyz123",
"connection":"YOUR_CONNECTION",
"client_id":"YOUR_CLIENT_ID"

I am not getting required response from above API endpoints. How can I implement sign up and login screen using auth0.


#2

Any progress on this?


#4

Hey there @user779 and @aditodkar, I would love to get some more information on this front. Can we get a code sample when you get a chance? Also can we get a DM of a HAR file capturing the failure in the response when it is occurring during the work flow. Information on working with HAR files can be found detailed here.

To establish a good basis I’m going to include the React Native Quickstart documentation as well as Universal Login details. Thanks!


#5

Wondering about doing custom login screens with react native. Would this at least require a full api integration, likely with our own api as well?

Looks like you really recommend to use Universal/Lock (hosted) solution. We will start with this but are curious about a non web-screen solution. I have not seen any examples doing quite what we are hoping for.


#6

We think Universal Login is a terrific solution but if you were looking for a more custom login experience, it’s discussed in the React Native Quickstart Documentation with this excerpt :

You can also embed login functionality directly in your application. If you use this method, some features, such as single sign-on, will not be accessible. To learn how to embed functionality using a custom login form in your application, follow the Custom Login Form Sample. Make sure you read the Browser-Based vs. Native Login Flows on Mobile Devices article to learn how to choose between the two types of login flows