Skip to content

Commit 8b04a7a

Browse files
authored
Merge pull request #32 from buggregator/feature/sso-updates
Updates information about supported SSO providers and configuration
2 parents 99925aa + 817ebea commit 8b04a7a

File tree

1 file changed

+82
-28
lines changed

1 file changed

+82
-28
lines changed

docs/config/sso.md

Lines changed: 82 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,119 @@
11
# Configuration — Single Sign-On (SSO)
22

3-
With the release of version 1.7.0, Buggregator now supports Single Sign-On (SSO) using [Auth0](https://auth0.com/). This
4-
integration allows users to authenticate with external identity providers supported by Auth0, providing a secure and
5-
seamless sign-in experience.
3+
With the release of version 1.7.0, Buggregator now supports Single Sign-On (SSO).
64

7-
![image](https://github.com/buggregator/server/assets/773481/3bc5dd4b-b8ac-4e2c-a9c0-5707dd053d0b)
5+
There is a list of supported SSO providers:
86

9-
By configuring SSO, you can streamline the authentication process and enhance the security of user management within
10-
your application.
7+
- [Auth0](https://auth0.com/)
8+
- [Kinde](https://kinde.com/)
119

12-
## Prerequisites
10+
This integration allows users to authenticate with external identity providers, providing
11+
a secure and seamless sign-in experience.
1312

14-
To configure SSO in Buggregator, you must have an [auth0.com](https://auth0.com/) account. If you do not have one, you
15-
can sign up for free.
13+
## Auth0
1614

17-
## Configuration Steps
15+
First, you need to have an Auth0 account. If you don't have one, you can [sign up](https://auth0.com/signup) for free.
1816

19-
To enable SSO, follow these steps:
17+
After creating an account, follow these steps:
2018

2119
1. **Enable Authentication**: Set the environment variable `AUTH_ENABLED` to `true` to enable authentication features in
2220
your application.
2321

24-
2. **Create an Auth0 Application**: Log in to your Auth0 account and create a new "Regular Web
25-
Application". After creating the application, you will receive a `Domain`, `Client ID` and `Client Secret` that you
26-
will need to use in the next steps.
22+
2. **Auth provider**: Set the environment variable `AUTH_PROVIDER` to `auth0` to specify that you are using Auth0 as
23+
your authentication provider.
24+
25+
3. **Create an Application**: Log in to your account and create a new "Regular Web Application". After creating, you
26+
will see a `Domain`, `Client ID` and `Client Secret` that you will need to use in the next steps.
2727

28-
3. **Configure Auth0 Settings**: Set up the following environment variables with the appropriate values from your Auth0
28+
4. **Configure Settings**: Set up the following environment variables with the appropriate values from your
2929
application:
3030

3131
- `AUTH_PROVIDER_URL`: The URL of your app domain, e.g., `https://<domain>.auth0.com`
3232
- `AUTH_CLIENT_ID`: The client ID provided by app.
3333
- `AUTH_CLIENT_SECRET`: The client secret provided by app.
3434
- `AUTH_CALLBACK_URL`: The callback URL that app will redirect to after authentication,
35-
e.g., `http://buggregator.server/auth/sso/callback`. Where `buggregator.server` is the domain of your Buggregator
36-
server.
35+
e.g., `http://buggregator.server/auth/sso/callback`. Where `buggregator.server` is the domain of your server.
3736
- `AUTH_SCOPES`: The scopes for which permissions are granted, typically include `openid`, `email`, and `profile`.
3837

39-
4. **Set Up Callback URL**: In your Auth0 application settings, configure the callback URL to point to
38+
5. **Set Up Callback URL**: In your Auth0 application settings, configure the callback URL to point to
4039
the `http://buggregator.server/auth/sso/callback` endpoint. Where `buggregator.server` is the domain of your
4140
Buggregator server.
4241

43-
Resultant environment variables should look like this:
42+
Finally, your `.env` file should look like this:
4443

4544
```dotenv
4645
AUTH_ENABLED=true
46+
AUTH_PROVIDER=auth0
4747
AUTH_PROVIDER_URL=https://<domain>.auth0.com
4848
AUTH_CLIENT_ID=xxx
4949
AUTH_CLIENT_SECRET=xxx
50-
AUTH_CALLBACK_URL=http://buggregator.server/auth/sso/callback
50+
AUTH_CALLBACK_URL=http://<server_address>/auth/sso/callback
51+
AUTH_SCOPES=openid,email,profile
52+
```
53+
54+
## Kinde
55+
56+
First, you need to have a Kinde account. If you don't have one, you
57+
can [sign up](https://app.kinde.com/auth/cx/_:nav&m:register&psid:83976d64db58431da88130f1f883d9a4) for free.
58+
59+
After creating an account, follow these steps:
60+
61+
1. **Enable Authentication**: Set the environment variable `AUTH_ENABLED` to `true` to enable authentication features in
62+
your application.
63+
64+
2. **Auth provider**: Set the environment variable `AUTH_PROVIDER` to `kinde`.
65+
66+
3. **Add an Application**: Log in to your account and add a new "Back-end web" application. After creating, you will
67+
see a `Domain`, `Client ID` and `Client Secret` that you will need to use in the next steps.
68+
69+
4. **Configure Settings**: Set up the following environment variables with the appropriate values from your
70+
application:
71+
72+
- `AUTH_PROVIDER_URL`: The URL of your app domain, e.g., `https://<domain>.kinde.com`
73+
- `AUTH_CLIENT_ID`: The client ID provided by app.
74+
- `AUTH_CLIENT_SECRET`: The client secret provided by app.
75+
- `AUTH_CALLBACK_URL`: The callback URL that app will redirect to after authentication,
76+
e.g., `http://buggregator.server/auth/sso/callback`. Where `buggregator.server` is the domain of your server.
77+
- `AUTH_LOGOUT_URL`: The callback URL that app will redirect to after authentication,
78+
e.g., `http://buggregator.server/auth/sso/logout`.
79+
- `AUTH_SCOPES`: The scopes for which permissions are granted, typically include `openid`, `email`, and `profile`.
80+
81+
5. **Set Up Callback URL**: In your application settings, configure the allowed callback URLs to point to
82+
the `http://buggregator.server/auth/sso/callback` endpoint.
83+
84+
6. **Set Up Login URL**: In your application settings, configure the callback URL to point to
85+
the `http://buggregator.server/auth/sso/login` endpoint.
86+
87+
7. **Set Up Logout URL**: In your application settings, configure the allowed logout redirect URLs to point to
88+
the `http://buggregator.server/auth/sso/logout` endpoint.
89+
90+
Finally, your `.env` file should look like this:
91+
92+
```dotenv
93+
AUTH_ENABLED=true
94+
AUTH_PROVIDER=kinde
95+
AUTH_PROVIDER_URL=https://<domain>.kinde.com
96+
AUTH_CLIENT_ID=xxx
97+
AUTH_CLIENT_SECRET=xxx
98+
AUTH_CALLBACK_URL=http://<server_address>/auth/sso/callback
99+
AUTH_LOGOUT_URL=http://<server_address>/auth/sso/logout
51100
AUTH_SCOPES=openid,email,profile
52101
```
53102

54-
### Verifying the Configuration
103+
## Other Providers
55104

56-
After configuring the environment variables, start your Buggregator server. You should now see Login page with the
57-
option to sign in using Auth0. If set up correctly, clicking this option will redirect you to the Auth0 authentication
58-
page where users can enter their credentials.
105+
Buggregator supports Auth0 and Kinde for now. You can try to use other SSO providers using the same steps. If it works,
106+
please update our documentation with your results. This will help us support more options and help others too.
107+
108+
## Verifying the Configuration
109+
110+
Once you set the environment variables, start your Buggregator server. You should see a Login page with an option to
111+
sign in. If everything is set up right, clicking this option will take you to the provider's login page.
112+
113+
![image](https://github.com/buggregator/server/assets/773481/3bc5dd4b-b8ac-4e2c-a9c0-5707dd053d0b)
59114

60-
After successful authentication, users will be redirected back to the Buggregator application and logged in. And you
61-
will see the user's profile information in the bottom left corner of the application.
115+
After logging in successfully, users will be redirected back to the Buggregator server and logged in. You will see the
116+
user's profile information in the bottom left corner of the app.
62117

63118
![image](https://github.com/buggregator/frontend/assets/773481/6f996c5e-f43a-4f5e-8da4-71f83110c7ba)
64119

@@ -67,5 +122,4 @@ will see the user's profile information in the bottom left corner of the applica
67122
If you encounter issues during the authentication process, ensure that:
68123

69124
- All environment variables are correctly set without any typos.
70-
- The callback URL in your Auth0 configuration matches the `AUTH_CALLBACK_URL` you specified.
71-
- Your Auth0 account has access to the scopes specified in `AUTH_SCOPES`.
125+
- The callback URL in your configuration matches the `AUTH_CALLBACK_URL` you specified.

0 commit comments

Comments
 (0)