Skip to content

Commit

Permalink
SF-3117 Add option to remove branding from auth0 page
Browse files Browse the repository at this point in the history
  • Loading branch information
RaymondLuong3 committed Jan 20, 2025
1 parent 0f5168c commit 01dd65c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,22 @@ describe('AuthService', () => {
}
}));

it('should login with defined logo', fakeAsync(() => {
const env = new TestEnvironment();
when(mockedLocationService.origin).thenReturn('https://scriptureforge.org');

env.service.logIn({ returnUrl: 'test-returnUrl' });

verify(mockedWebAuth.loginWithRedirect(anything())).once();
const authOptions: RedirectLoginOptions | undefined = capture<RedirectLoginOptions | undefined>(
mockedWebAuth.loginWithRedirect
).last()[0];
expect(authOptions).toBeDefined();
if (authOptions != null) {
expect(authOptions.authorizationParams!.logo).toBeDefined();
}
}));

it('should link with Paratext', fakeAsync(() => {
const env = new TestEnvironment({ isOnline: true, isLoggedIn: true });
const returnUrl = 'test-returnUrl';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ interface LoginParams {

interface xForgeAuth0Parameters extends AuthorizationParams {
mode?: string;
logo?: string;
login_hint?: string;
language?: string;
enablePasswordless?: boolean;
Expand Down Expand Up @@ -247,7 +248,8 @@ export class AuthService {
ui_locales: language,
enablePasswordless: true,
language,
login_hint: ui_locales
login_hint: ui_locales,
logo: 'https://auth0.languagetechnology.org/assets/sf.svg'
};

if (signUp || this.isJoining) {
Expand Down

0 comments on commit 01dd65c

Please sign in to comment.