② Cloud Access Manager authenticates the user (using the browser) and establishes whether the user grants or denies the client's access request.
③ Assuming the user grants access, Cloud Access Manager redirects the browser back to the client using the redirection URI provided earlier. The redirection URI includes the access token in the URI fragment, for example.
④ The browser follows the redirection instructions by making a request to the web-hosted client resource (which does not include the fragment). The browser retains the fragment information locally.
⑤ The web-hosted client resource returns a web page (typically an HTML document with an embedded script) capable of accessing the full redirection URI including the fragment retained by the browser, and extracting the access token (and other parameters) contained in the fragment.
⑥ The browser executes the script provided by the web-hosted client resource locally, which extracts the access token.
⑦ The browser passes the access token to the client. The access token can then be used to access the required resource.