Skip to content

Help: native client app use? #628

Answered by muhlemmer
shyfishy asked this question in Q&A
Discussion options

You must be logged in to vote

For a native app, you can start a HTTP listener on the localhost, with a random port and a callback path. It the Provider sees a client type native, it allows redirects to random port numbers. So the native app will need to:

  1. Start a HTTP server on a random / unprivileged port
  2. Form a redirect URL http://localhost:<port>/callback
  3. Build the auth request URL with the required parameters including the redirect_url
  4. Open the OS' browser point to the auth request URL.
    • On linux systems the xdg-open mechanism can be used for example
    • If you use Go, browser.OpenURL() might be a good option
  5. User completes login flow
  6. User is redirected with authorization code to the redirect_url created above
  7. Nativ…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shyfishy
Comment options

Answer selected by shyfishy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #626 on August 01, 2024 08:07.