-
Notifications
You must be signed in to change notification settings - Fork 178
Revamp onboarding flow #376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 29 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
e277c6b
sign up copy nits
msukkari 846d2d0
first pass at new onboarding page
msukkari 61a0b33
wip join onboard logic
msukkari 6f46518
refactor auth provider fetch logic
msukkari 955d60e
add member approval and invite link flag logic
msukkari 44b8370
update join request flow and remove jit logic
msukkari a0fb330
onboard guard
msukkari 6943ccf
nits, onboard role check, invite link enabled check
msukkari 22d68a6
fix bg color issue in onboarding page
msukkari 57c94f1
refactor onboard UI
msukkari 6191bca
ui nits and more onboarding resource cards
msukkari d221657
revamp auth docs
msukkari 644d46a
change member approval default behavior and updated docs
msukkari 1ef491b
merge prisma migrations
msukkari 4b68ed9
add id to resource card
msukkari e1a7d0d
feedback
msukkari 1ba266a
feedback
msukkari f781ab1
feedback and fixed build
msukkari 97fc0c3
settings drop down UI nit
msukkari abe959b
ui nits
msukkari 04edbed
handle join when max capacity case
msukkari 86189b2
add news data for member toggle
msukkari 7b3e6e7
refactor for public access case
msukkari bdfef1c
add iap bridge to onboard logic
msukkari 22b9e53
fetch member approval req and invite link enabled flag on server
msukkari db6ab06
ui nits
msukkari 5819708
fix invite link enable toggle snapping issue
msukkari cf18a0d
ui nits
msukkari c714555
styling and ui nits, pass in invite id from server
msukkari 96c5fc2
add mcp resource in onboard step
msukkari 81e6b61
get invite link in server
msukkari b15b13a
Merge branch 'main' into msukkarieh/onboard
msukkari 71ced6a
fix build issue
msukkari 2666469
refactor docs on config
msukkari 7ea5437
minor doc nit
msukkari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| --- | ||
| title: FAQ | ||
| --- | ||
|
|
||
| This page covers a range of frequently asked questions about Sourcebot's built-in authentication system. | ||
|
|
||
| <AccordionGroup> | ||
| <Accordion title="Can I disable the authentication system?"> | ||
| No, at this time it's not possible to disable the authentication system. If this is preventing you from deploying Sourcebot | ||
| within your organization please [reach out](https://www.sourcebot.dev/contact) | ||
| </Accordion> | ||
|
|
||
| <Accordion title="I don't want to restrict access to my Sourcebot deployment, what should I do?"> | ||
| Every user must register an account within your Sourcebot deployment. However, this dosn't mean their access | ||
| is restricted. | ||
|
|
||
| Unless member approval is required, anyone can sign up for an account on your deployment and immediately be granted access. | ||
| </Accordion> | ||
|
|
||
| <Accordion title="Does any data related to authentication (emails, passwords, etc) leave my deployment?"> | ||
| **No data related to authentication (or your code) leaves your deployment**. Authentication is handled | ||
| purely by your deployment and the authentication providers you configure. | ||
|
|
||
| This data does not leave your device and is stored within in the database managed by your deployment. If you're | ||
| using credential login, passwords are encrypted at rest and in transit. | ||
| </Accordion> | ||
|
|
||
| <Accordion title="I'm deploying Sourcebot behind an identity proxy, do I still need to create an account in Sourcebot?"> | ||
| <Note>Please note that IAP bridges are an enterprise feature</Note> | ||
| Sourcebot supports connecting your identity proxy directly into the built-in auth system using an IAP bridge. This allows Sourcebot to | ||
| register and authenticate automatically on a successful identity proxy log in. | ||
|
|
||
| Sourcebot currently supports [GCP IAP](/docs/configuration/auth/providers#gcp-iap). If you're using a different IAP | ||
| and require support, please [reach out](https://www.sourcebot.dev/contact) | ||
| </Accordion> | ||
|
|
||
| <Accordion title="How does Sourcebot implement authentication?"> | ||
| Sourcebot uses [Auth.js](https://authjs.dev/) as its underlying authentication framework. Auth.js provides authentication providers | ||
| (credientials, Google, GitHub, etc) and an interface to enable user registration and log in. Internally, Auth.js uses JWT to provide | ||
| Sourcebot secure and reliable information about user authentication. | ||
| </Accordion> | ||
| </AccordionGroup> | ||
|
|
||
|
|
||
| Have a question that's not answered here? Submit it on our [GitHub discussions](https://github.com/sourcebot-dev/sourcebot/discussions) | ||
| page and we'll get back to you as soon as we can! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| title: Inviting Members | ||
| sidebarTitle: Inviting members | ||
| --- | ||
|
|
||
| There are various ways to configure how members can join a Sourcebot deployment. | ||
|
|
||
| ## Member Approval | ||
|
|
||
| **By default, Sourcebot requires new members to be approved by the owner of the deployment**. This section explains how approvals work and how | ||
| to configure this behavior. | ||
|
|
||
| ### Configuration | ||
| Member approval can be configured by the owner of the deployment by navigating to **Settings -> Members**: | ||
|
|
||
|  | ||
|
|
||
| ### Managing Requests | ||
|
|
||
| If member approval is enabled, new members will be asked to submit a join request after signing up. They will not have access to the Sourcebot deployment | ||
| until this request is approved by the owner. | ||
|
|
||
| The owner can see and manage all pending join requests by navigating to **Settings -> Members**. | ||
|
|
||
| ## Invite link | ||
|
|
||
| If member approval is required, an owner of the deployment can enable an invite link. When enabled, users | ||
| can use this invite link to register and be automatically added to the organization without approval: | ||
|
|
||
|  |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| --- | ||
| title: Providers | ||
| --- | ||
|
|
||
| Sourcebot supports a wide range of different authentication providers through it's integration with [Auth.js](https://authjs.dev/). This page | ||
| highlights how to configure the various supported providers. | ||
|
|
||
| If theres an authentication provider you'd like us to support, please [reach out](https://www.sourcebot.dev/contact). | ||
|
|
||
| # Core Authentication Providers | ||
|
|
||
| ### Email / Password | ||
| --- | ||
| Email / password authentication is enabled by default. It can be **disabled** by setting `AUTH_CREDENTIALS_LOGIN_ENABLED` to `false`. | ||
|
|
||
| ### Email codes | ||
| --- | ||
| Email codes are 6 digit codes sent to a provided email. Email codes are enabled when transactional emails are configured using the following environment variables: | ||
|
|
||
| - `AUTH_EMAIL_CODE_LOGIN_ENABLED` | ||
| - `SMTP_CONNECTION_URL` | ||
| - `EMAIL_FROM_ADDRESS` | ||
|
|
||
|
|
||
| See [transactional emails](/docs/configuration/transactional-emails) for more details. | ||
|
|
||
| # Enterprise Authentication Providers | ||
|
|
||
| The following authentication providers require an [enterprise license](/docs/license-key) to be enabled. | ||
|
|
||
| ### GitHub | ||
| --- | ||
|
|
||
| [Auth.js GitHub Provider Docs](https://authjs.dev/getting-started/providers/github) | ||
|
|
||
| **Required environment variables:** | ||
| - `AUTH_EE_GITHUB_CLIENT_ID` | ||
| - `AUTH_EE_GITHUB_CLIENT_SECRET` | ||
|
|
||
| Optional environment variables: | ||
| - `AUTH_EE_GITHUB_BASE_URL` - Base URL for GitHub Enterprise (defaults to https://github.com) | ||
|
|
||
| ### GitLab | ||
| --- | ||
|
|
||
| [Auth.js GitLab Provider Docs](https://authjs.dev/getting-started/providers/gitlab) | ||
|
|
||
| **Required environment variables:** | ||
| - `AUTH_EE_GITLAB_CLIENT_ID` | ||
| - `AUTH_EE_GITLAB_CLIENT_SECRET` | ||
|
|
||
| Optional environment variables: | ||
| - `AUTH_EE_GITLAB_BASE_URL` - Base URL for GitLab instance (defaults to https://gitlab.com) | ||
|
|
||
| --- | ||
|
|
||
| [Auth.js Google Provider Docs](https://authjs.dev/getting-started/providers/google) | ||
|
|
||
| **Required environment variables:** | ||
| - `AUTH_EE_GOOGLE_CLIENT_ID` | ||
| - `AUTH_EE_GOOGLE_CLIENT_SECRET` | ||
|
|
||
| ### GCP IAP | ||
| --- | ||
|
|
||
| <Note>If you're running Sourcebot in an environment that blocks egress, make sure you allow the [IAP IP ranges](https://www.gstatic.com/ipranges/goog.json)</Note> | ||
|
|
||
| Custom provider built to enable automatic Sourcebot account registration/login when using GCP IAP. | ||
|
|
||
| **Required environment variables** | ||
| - `AUTH_EE_GCP_IAP_ENABLED` | ||
| - `AUTH_EE_GCP_IAP_AUDIENCE` | ||
| - This can be found by selecting the ⋮ icon next to the IAP-enabled backend service and pressing `Get JWT audience code` | ||
|
|
||
| ### Okta | ||
| --- | ||
|
|
||
| [Auth.js Okta Provider Docs](https://authjs.dev/getting-started/providers/okta) | ||
|
|
||
| **Required environment variables:** | ||
| - `AUTH_EE_OKTA_CLIENT_ID` | ||
| - `AUTH_EE_OKTA_CLIENT_SECRET` | ||
| - `AUTH_EE_OKTA_ISSUER` | ||
|
|
||
| ### Keycloak | ||
| --- | ||
|
|
||
| [Auth.js Keycloak Provider Docs](https://authjs.dev/getting-started/providers/keycloak) | ||
|
|
||
| **Required environment variables:** | ||
| - `AUTH_EE_KEYCLOAK_CLIENT_ID` | ||
| - `AUTH_EE_KEYCLOAK_CLIENT_SECRET` | ||
| - `AUTH_EE_KEYCLOAK_ISSUER` | ||
|
|
||
| ### Microsoft Entra ID | ||
|
|
||
| [Auth.js Microsoft Entra ID Provider Docs](https://authjs.dev/getting-started/providers/microsoft-entra-id) | ||
|
|
||
| **Required environment variables:** | ||
| - `AUTH_EE_MICROSOFT_ENTRA_ID_CLIENT_ID` | ||
| - `AUTH_EE_MICROSOFT_ENTRA_ID_CLIENT_SECRET` | ||
| - `AUTH_EE_MICROSOFT_ENTRA_ID_ISSUER` | ||
|
|
||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions
13
packages/db/prisma/migrations/20250713041019_add_onboarding_revamp_changes/migration.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| /* | ||
| Warnings: | ||
|
|
||
| - You are about to drop the column `pendingApproval` on the `User` table. All the data in the column will be lost. | ||
|
|
||
| */ | ||
| -- AlterTable | ||
| ALTER TABLE "Org" ADD COLUMN "inviteLinkEnabled" BOOLEAN NOT NULL DEFAULT false, | ||
| ADD COLUMN "inviteLinkId" TEXT, | ||
| ADD COLUMN "memberApprovalRequired" BOOLEAN NOT NULL DEFAULT true; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE "User" DROP COLUMN "pendingApproval"; | ||
msukkari marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.