Skip to content

Commit

Permalink
removed bold
Browse files Browse the repository at this point in the history
  • Loading branch information
Spiral-Memory committed Jul 4, 2024
1 parent 1498ea0 commit 1dac336
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/react/docs/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ Certainly! Here are the instructions to enable OAuth login in the EmbeddedChat R

#### Steps to Enable OAuth Login in EmbeddedChat RC App

1. **Copy Callback URL**:
1. _Copy Callback URL:_
Navigate to the settings of your EmbeddedChat RC app. Locate the Callback URL and copy it.

2. **Configure Third-Party Login**:
2. _Configure Third-Party Login:_
Access your Rocket.Chat workspace. Navigate to the Third-Party Login settings. Click on New Application, provide a suitable name, and paste the copied Callback URL. Obtain the client ID and secret for this application, then activate it.

3. **Update EmbeddedChat RC App Settings**:
3. _Update EmbeddedChat RC App Settings:_
Return to the settings of your EmbeddedChat RC app. Paste the obtained client ID and secret into the respective fields. Save the updated settings.

4. **Creating Custom OAuth:**
4. _Creating Custom OAuth:_
Navigate to Workspace Settings > OAuth within your Rocket.Chat workspace. Here, create a new custom OAuth configuration with a suitable name, and configure it as follows:

- URL: http://your-rocket-chat-server-url/api/v1
Expand All @@ -96,10 +96,10 @@ Certainly! Here are the instructions to enable OAuth login in the EmbeddedChat R
- Enable: Merge Users and Merge users from distinct services.
- Disable: Show Button on Login Page.

5. **Finalize EmbeddedChat RC App Configuration**:
5. _Finalize EmbeddedChat RC App Configuration:_
Go back to the settings of your EmbeddedChat RC app. Enter the lowercase name of your custom OAuth configuration. Save the settings to apply the OAuth integration.

6. **Enable OAuth Login for Users**:
6. _Enable OAuth Login for Users:_
By default, only administrators can use OAuth login. To enable OAuth login for all users, navigate to Workspace > Permissions, search for manage OAuth apps permission, and grant it to the desired user roles.

Following these steps will successfully enable OAuth login in the EmbeddedChat RC app, integrating it with your Rocket.Chat workspace for streamlined user authentication.
Expand All @@ -112,9 +112,9 @@ A video demonstration can also be found below to assist in successfully enabling

Currently, EmbeddedChat supports two modes for enabling auto-login. After the user completes the login process, the Rocket.chat server returns a token referred to as `ec-token`. This token can be saved in two ways:

1. **Storing in Local Storage**: By default, the `ec-token` is stored in local storage. Upon initial loading, if an `ec-token` is found in local storage, it triggers auto login and manages subsequent actions accordingly.
1. _Storing in Local Storage_: By default, the `ec-token` is stored in local storage. Upon initial loading, if an `ec-token` is found in local storage, it triggers auto login and manages subsequent actions accordingly.

2. **Storing as HTTP-Only Cookie**: By setting the `secure` prop to true, the `ec-token` can be stored as an HTTP-only cookie. This approach enhances security by preventing JavaScript access to the token. Note that this feature requires the EmbeddedChat RC app to be installed on the server.
2. _Storing as HTTP-Only Cookie_: By setting the `secure` prop to true, the `ec-token` can be stored as an HTTP-only cookie. This approach enhances security by preventing JavaScript access to the token. Note that this feature requires the EmbeddedChat RC app to be installed on the server.

Here’s a concise explanation of how it operates: after logging in, the token is transferred to the EmbeddedChat RC app, where it is set as an HTTP-only cookie. During auto-login, EmbeddedChat makes a request that includes cookies managed by the browser to the RC app endpoint. The RC app retrieves the token and sends it back, which EmbeddedChat then forwards to the `/api/v1/login` endpoint of the Rocket.chat server for authentication. This functionality is fully integrated into the EmbeddedChat app, presented here for technical insight.

Expand Down

0 comments on commit 1dac336

Please sign in to comment.