question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] React Native auth flow

See original GitHub issue

Describe the question Question about integration with the framework.

I posted an issue some weeks ago. The client on React Native has an auth webview, and returns response from azure with some params. However, I’m not sure how to proceed, since I want to send the params to the FastAPI backend.

Is it possible to use fastapi-azure-auth as a bridge and be able to execute the following steps?:

  • Send params to FastAPI, Process params from azure response (the structure I’m handling is described later in this issue)
  • Save user data from azure on DB, save the user credentials, such as email and department, on the database.
  • Return an auth token, return an auth token for authorization tokens on requests

To Reproduce I’m coding a sign in service for a mobile app. I want my flow to work as follows, but I’m stuck in the steps inside the circle: image

The params of the step Send params to FastAPI have the following JSON structure (fake values):

{
   "authentication":null,
   "error":null,
   "errorCode":null,
   "params":{
      "code":"0.AQMAE...",
      "session_state":"123123123-as123-4f1231-1we12",
      "state":"123bkbk21j3b"
   },
   "type":"success",
   "url":"exp://192.168.1.66:19000/?code=0.AQMAE..."
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JonasKscommented, Oct 23, 2021

I believe this question has been answered, so I’ll close this issue.

Feel free to reopen or keep commenting, I will still get notified.

1reaction
JonasKscommented, Oct 22, 2021

In other words, you’d have to create your own dependency which depends on the azure scheme, and use the access_token

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authentication flows - React Navigation
Most apps require that a user authenticate in some way to have access to data associated with a user or other private content....
Read more >
React Native Authentication Flow, the Simplest and Most ...
This article will explain how created a React Native authentication flow that connects to APIs, persists data to be recovered in future ...
Read more >
React native navigation v6 authentication flow - Stack Overflow
The typical logout flow for use when you are using react-navigation means that when you perform the logout action you don't actually need...
Read more >
Setting up an Authentication Flow in React Native
Learn how to configure your router to check, manage, and route to the right place based on the user's authentication state.
Read more >
How React Native Authentication is done? - eduCBA
Guide to React Native Authentication. Here we discuss the introduction and how react native authentication is done with programming examples.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found