Skip to content

add {PROVIDER}_DISPLAY_NAME env-var #8967

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

n1cc00
Copy link

@n1cc00 n1cc00 commented May 16, 2025

This environment variable is added to the front-service to allow setting a custom provider name for OpenId Login button:

huly_openiddisplayname

@n1cc00 n1cc00 force-pushed the customize-openid-login-button branch from 3687036 to dbcd12d Compare May 16, 2025 08:15
Copy link

Connected to Huly®: UBERF-10629

1 similar comment
Copy link

Connected to Huly®: UBERF-10629

@n1cc00 n1cc00 force-pushed the customize-openid-login-button branch from 510a8f6 to 112a908 Compare May 16, 2025 13:07
Copy link
Collaborator

@lexiv0re lexiv0re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. Could you please also attach a screenshot of how it looks when configured with a custom name.

@@ -2,9 +2,12 @@
import { Label } from '@hcengineering/ui'
import OpenId from '../icons/OpenId.svelte'
import login from '../../plugin'
import { getMetadata } from '@hcengineering/platform'

const openIdDisplayName = getMetadata(login.metadata.DisableSignUp) ?? 'OpenId'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong metadata being read?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. Must have hit Ctrl-Z once too much there 😄

@@ -119,6 +119,8 @@ export function startFront (ctx: MeasureContext, extraConfig?: Record<string, st

const disableSignUp = process.env.DISABLE_SIGNUP

const openIdDisplayName = process.env.OPENID_DISPLAY_NAME
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to define this variable in the accounts service along with all other variables defining the provider and return it along with the providers' ids in the /providers request? It'd help to simplify things:

  1. The whole provider entity is defined in one place
  2. Handled with one piece of code for both the web ui and the desktop
  3. Will also be available to any other clients besides the web ui and the desktop (e.g. automation, custom integrations, etc.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I still committed a fix for the current approach for now and will have a look into this next week

Copy link
Author

@n1cc00 n1cc00 May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay so I made a new version including it in the /providers request. I added the functionality to GitHub and google providers too for the sake of consistency (GOOGLE_DISPLAY_NAME, GITHUB_DISPLAY_NAME). Even though it probably won't really be used there.

@n1cc00 n1cc00 force-pushed the customize-openid-login-button branch 2 times, most recently from 36b8cf2 to 7a6525f Compare May 16, 2025 17:22
…on (configurable via *_PROVIDER_NAME)

Signed-off-by: nicolasschneider <[email protected]>
@n1cc00 n1cc00 force-pushed the customize-openid-login-button branch from 7a6525f to c313db2 Compare May 19, 2025 09:31
@n1cc00 n1cc00 changed the title add OPENID_DISPLAY_NAME env-var add {PROVIDER}_DISPLAY_NAME env-var May 19, 2025
@n1cc00 n1cc00 requested a review from lexiv0re May 19, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants