diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-09-27 17:09:44 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2023-09-29 13:31:43 +0200 |
| commit | 8f784bd0657302977ccc434b4859f37ad59616c9 (patch) | |
| tree | 188a397be01a8a4b535bfa2c54a3a86b4039babc /docs/src/api/functiondocs.md | |
| parent | b4f04a2cd7162b3c88f9ac28d5a19d56bbe626aa (diff) | |
Exports Docs: Improve examples for mobile redirects
Diffstat (limited to 'docs/src/api/functiondocs.md')
| -rw-r--r-- | docs/src/api/functiondocs.md | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/docs/src/api/functiondocs.md b/docs/src/api/functiondocs.md index 7937196..b93baa8 100644 --- a/docs/src/api/functiondocs.md +++ b/docs/src/api/functiondocs.md @@ -87,13 +87,14 @@ 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. 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 + 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)`. E.g. + `CookieReply(x, "/callback?code=...&state=...&iss=...")` this is the + path of the request 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, @@ -494,13 +495,14 @@ So a client would: - 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 + 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)`. E.g. + `CookieReply(x, "/callback?code=...&state=...&iss=...")` this is the + path of the request 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 |
