diff options
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 |
