Skip to content

Commit

Permalink
fix(passport): set app name with no custom domain (#2440)
Browse files Browse the repository at this point in the history
  • Loading branch information
poolsar42 authored Jun 23, 2023
1 parent 90f740f commit 1c1cff4
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions apps/passport/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,34 @@ export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper(
if (context.appProps) {
appProps = context.appProps
} else {
const name = params.clientId
? params.clientId.charAt(0).toUpperCase() + params.clientId.slice(1)
: 'Passport'
appProps = {
name: `Rollup - ${name}`,
iconURL: LogoIndigo,
termsURL: 'https://rollup.id/tos',
privacyURL: 'https://rollup.id/privacy-policy',
redirectURI: `https://${params.clientId}.rollup.id`,
websiteURL: 'https://rollup.id',
if (!params.clientId) {
const name = 'Passport'
appProps = {
name: `Rollup - ${name}`,
iconURL: LogoIndigo,
termsURL: 'https://rollup.id/tos',
privacyURL: 'https://rollup.id/privacy-policy',
redirectURI: `https://passport.rollup.id`,
websiteURL: 'https://rollup.id',
}
} else {
if (['console', 'passport'].includes(params.clientId!)) {
const name =
params.clientId.charAt(0).toUpperCase() + params.clientId.slice(1)
appProps = {
name: `Rollup - ${name}`,
iconURL: LogoIndigo,
termsURL: 'https://rollup.id/tos',
privacyURL: 'https://rollup.id/privacy-policy',
redirectURI: `https://${params.clientId}.rollup.id`,
websiteURL: 'https://rollup.id',
}
} else {
const sbClient = getStarbaseClient('', context.env, context.traceSpan)
appProps = await sbClient.getAppPublicProps.query({
clientId: params.clientId!,
})
}
}
}

Expand Down

0 comments on commit 1c1cff4

Please sign in to comment.