+ 1
Redirection URL to a react native page from Backend
I have implemented OAuth login with Spring Boot. So, when a user successfully logs in, I generate a JWT token. I want to redirect to react native page after successful authentication with JWT token(maybe as a query parameter) I'm not sure what should be the redirect URL in spring boot to redirect to react native page. On searching I can only find URLs specific to React js.
5 Respostas
+ 1
Pulkit Kamboj Then use react-native-app-auth.
https://github.com/FormidableLabs/react-native-app-auth
The key here is to register a redirect URL scheme. The usual http kind won't work. You will have to register a scheme, like "com.myapp" (common with package name) that is unique. And configure the redirect URL using that scheme. Something like "com.myapp://oauth2". When this redirect URL is issued by the backend of app, it will be redirected to the app (as the scheme is registered) instead of trying to launch it on the webview.
+ 1
Thanks a lot Mustafa A , I will give this a read and try to implement it
0
React Native page? Are you using React Native for a website?
0
Hi Mustafa A , I am making an mobile application in react native which calls APIs of backend written in spring boot
I am implementing login with google functionality where the frontend redirects to backend which in turn redirects to Google page for authentication. But, I am not sure how to redirect back to a react native page after successful authentication.
0
hello @Pulkit Kamboj , did you find a solution to your problem ?