Skip to content

Commit

Permalink
rmf-auth, TODO login stories, add new to keycloak creation
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Dec 5, 2023
1 parent bbb9675 commit 4e8cb2d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 25 deletions.
50 changes: 26 additions & 24 deletions packages/rmf-auth/lib/components/login.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
import { Meta, Story } from '@storybook/react';
import React from 'react';
import { LoginCard as LoginCard_, LoginPage as LoginPage_ } from '.';
import { LoginCardProps } from './login-card';
// TODO(ac): commented out during node 18 migration

export default {
title: 'Login',
component: LoginCard_,
argTypes: {
title: {
defaultValue: 'Title',
},
logo: {
control: {
disable: true,
},
},
},
} as Meta;
// import { Meta, Story } from '@storybook/react';
// import React from 'react';
// import { LoginCard as LoginCard_, LoginPage as LoginPage_ } from '.';
// import { LoginCardProps } from './login-card';

export const LoginCard: Story<LoginCardProps> = (args) => (
<LoginCard_ {...args} logo="/resources/ros-health.png" />
);
// export default {
// title: 'Login',
// component: LoginCard_,
// argTypes: {
// title: {
// defaultValue: 'Title',
// },
// logo: {
// control: {
// disable: true,
// },
// },
// },
// } as Meta;

export const LoginPage: Story<LoginCardProps> = (args) => (
<LoginPage_ {...args} logo="/resources/ros-health.png" />
);
// export const LoginCard: Story<LoginCardProps> = (args) => (
// <LoginCard_ {...args} logo="/resources/ros-health.png" />
// );

// export const LoginPage: Story<LoginCardProps> = (args) => (
// <LoginPage_ {...args} logo="/resources/ros-health.png" />
// );
2 changes: 1 addition & 1 deletion packages/rmf-auth/lib/keycloak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class KeycloakAuthenticator
*/
constructor(config: Keycloak.KeycloakConfig | string, silentCheckSsoRedirectUri?: string) {
super();
this._inst = Keycloak(config);
this._inst = new Keycloak(config);
this._silentCheckSsoRedirectUri = silentCheckSsoRedirectUri;
}

Expand Down

0 comments on commit 4e8cb2d

Please sign in to comment.