> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/vxp-visual-experience-platform/settings/project/access/oauth2.md).

# OAuth2

OAuth2 allows external websites or applications to access resources hosted by Hub on behalf of a user.

OAuth2 authentication is a more secure and complex authentication method that allows users to grant limited access to their resources without exposing their credentials.

{% hint style="info" %}

* Only users with **admin** or **owner** levels (roles) have access to the OAuth2 page in Settings
  {% endhint %}

|                    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                          |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| OAuth 2 login URL  | Read only input field which providing a link to Hub OAuth2 login page and could be used on external website.                                                                                                                                                                                                                                                                                                                                                                                                                |                          |
| Service Name       | Input field to add name of the service which will appears on *OAuth2 login page.*                                                                                                                                                                                                                                                                                                                                                                                                                                           |                          |
| Communication Type | <p>Section where the communication type can be selected to define how the Hub will interact (sending session data) with an external section.<br><br>There are two options: <br></p><ul><li><strong>Post message</strong> - a common way for OAuth2 login when data is sent by <code>window\.opener.postMessage(JSON.stringify(data))</code></li><li><strong>Redirect</strong> - communication type to send session\_uuid in URL via redirect <em>(e.g. <https://redirect.com/oauth2/success?session_uuid=…>)</em></li></ul> |                          |
| Example            | <p>Section to simplify integration</p><ul><li>Code block content is different based on selected <em>Communication type (Post message                                                                                                                                                                                                                                                                                                                                                                                        | Redirect)</em></li></ul> |
