diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-09-27 15:37:23 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2023-09-29 13:31:43 +0200 |
| commit | ee38ef96dfa6409bca1edc37d9ab63c27d3adcec (patch) | |
| tree | 0d6f57339144847d5c0bd520cbde1cdfa4081d47 /docs/src/api/functiondocs.md | |
| parent | 8a5e8dad79cf07dd15be47b16d97c228c2bc17d2 (diff) | |
Client + Server + OAuth: Support mobile redirects
Diffstat (limited to 'docs/src/api/functiondocs.md')
| -rw-r--r-- | docs/src/api/functiondocs.md | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/docs/src/api/functiondocs.md b/docs/src/api/functiondocs.md index 1f31871..7937196 100644 --- a/docs/src/api/functiondocs.md +++ b/docs/src/api/functiondocs.md @@ -86,7 +86,15 @@ The following state callbacks are mandatory to handle: - OAUTH_STARTED: This indicates that the OAuth procedure has been started, it returns the URL as the data. The client should open the webbrowser - with this URL and continue the authorization process. + with this URL and continue the authorization process. Note: For mobile + platforms this returns a Cookie and data (json: {"cookie": x, "data": + url}). This `url` should also be opened in the browser like desktop + platforms. But these platforms also need to reply to the library + to give back the full authorization code URI with CookieReply(x, + uri) that the apps get back when the user clicks approve. For this, + apps need to register an app url or sorts. For the valid values + for app URLs, see the redirect URIs for mobile platforms here + https://git.sr.ht/~fkooman/vpn-user-portal/tree/v3/item/src/OAuth/VpnClientDb.php Example Input (3=custom server): ```AddServer(mycookie, 3, "https://demo.eduvpn.nl", 0)``` @@ -483,8 +491,17 @@ So a client would: ### OAUTH_STARTED -This indicates that the OAuth procedure has been started, it returns the URL -as the data. + - OAUTH_STARTED: This indicates that the OAuth procedure has been started, + it returns the URL as the data. The client should open the webbrowser + with this URL and continue the authorization process. Note: For mobile + platforms this returns a Cookie and data (json: {"cookie": x, "data": + url}). This `url` should also be opened in the browser like desktop + platforms. But these platforms also need to reply to the library + to give back the full authorization code URI with CookieReply(x, + uri) that the apps get back when the user clicks approve. For this, + apps need to register an app url or sorts. For the valid values + for app URLs, see the redirect URIs for mobile platforms here + https://git.sr.ht/~fkooman/vpn-user-portal/tree/v3/item/src/OAuth/VpnClientDb.php The client should open the webbrowser with this URL and continue the authorization process. This is only called if authorization needs to be |
