From 549cd588fd9fe365eb256cd3a04a561a96545f4c Mon Sep 17 00:00:00 2001 From: RedlineTriad <39059512+RedlineTriad@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:35:01 +0200 Subject: [PATCH] doc: improvements for Bitbucket Server auth Previously, it did not mention updating the sign-in page. Also it skipped configuring the ScmAuth provider for non-default hosts, which is always necessary for Bitbucket Server. Signed-off-by: RedlineTriad <39059512+RedlineTriad@users.noreply.github.com> --- docs/auth/bitbucketServer/provider.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/auth/bitbucketServer/provider.md b/docs/auth/bitbucketServer/provider.md index b15f0b206a..c41457d09c 100644 --- a/docs/auth/bitbucketServer/provider.md +++ b/docs/auth/bitbucketServer/provider.md @@ -31,7 +31,7 @@ auth: providers: bitbucketServer: development: - host: bitbucket.org + host: bitbucket.example.org clientId: ${AUTH_BITBUCKET_SERVER_CLIENT_ID} clientSecret: ${AUTH_BITBUCKET_SERVER_CLIENT_SECRET} ``` @@ -77,7 +77,14 @@ backend.add( //... ``` -## Adding the provider to the Backstage frontend +## Frontend Configuration -To add the provider to the frontend, add the `bitbucketServerAuthApi` reference and `SignInPage` component as shown -in [Adding the provider to the sign-in page](../index.md#sign-in-configuration). +### Sign-in + +To add the provider to the frontend, add the `bitbucketServerAuthApiRef` reference and +`SignInPage` component as shown in +[Adding the provider to the sign-in page](../index.md#sign-in-configuration). + +### ScmAuth + +For backstage to be able to use the oauth token of the logged in user to access the Bitbucket Server API, you need to add it to list of ScmAuth providers as shown in [Custom ScmAuthApi Implementation](../index.md#custom-scmauthapi-implementation) using the `ScmAuth.forBitbucketServer` method.