File tree Expand file tree Collapse file tree 11 files changed +18
-32
lines changed
routes/console/project-[project]/auth Expand file tree Collapse file tree 11 files changed +18
-32
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import Oidc from '../../routes/console/project-[project]/auth/oidcOAuth.svelte';
1212import Okta from '../../routes/console/project-[project]/auth/oktaOAuth.svelte' ;
1313
1414export type Provider = Models . Provider & {
15+ key : string ;
1516 icon : string ;
1617 docs ?: string ;
1718 component ?: typeof SvelteComponent ;
@@ -24,11 +25,12 @@ export type Providers = {
2425const setProviders = ( project : Models . Project ) : Provider [ ] => {
2526 return (
2627 project ?. providers . map ( ( n ) => {
28+ const p = n as Models . Provider & { key : string } ;
2729 let docs : Provider [ 'docs' ] ;
28- let icon : Provider [ 'icon' ] = n . name . toLowerCase ( ) ;
30+ let icon : Provider [ 'icon' ] = p . key . toLowerCase ( ) ;
2931 let component : Provider [ 'component' ] = Main ;
3032
31- switch ( n . name . toLowerCase ( ) ) {
33+ switch ( p . key . toLowerCase ( ) ) {
3234 case 'amazon' :
3335 docs = 'https://developer.amazon.com/apps-and-games/services-and-apis' ;
3436 break ;
@@ -156,7 +158,7 @@ const setProviders = (project: Models.Project): Provider[] => {
156158 }
157159
158160 return {
159- ...n ,
161+ ...p ,
160162 icon,
161163 docs,
162164 component
Original file line number Diff line number Diff line change 6363 <div >
6464 <p >URI</p >
6565 <CopyInput
66- value ={` ${
67- sdk .forConsole .client .config .endpoint
68- }/account/sessions/oauth2/callback/${provider .name .toLocaleLowerCase ()}/${projectId } ` } />
66+ value ={` ${sdk .forConsole .client .config .endpoint }/account/sessions/oauth2/callback/${provider .key }/${projectId } ` } />
6967 </div >
7068 </FormList >
7169 <svelte:fragment slot =" footer" >
Original file line number Diff line number Diff line change 7272 <div >
7373 <p >URI</p >
7474 <CopyInput
75- value ={` ${
76- sdk .forConsole .client .config .endpoint
77- }/account/sessions/oauth2/callback/${provider .name .toLocaleLowerCase ()}/${projectId } ` } />
75+ value ={` ${sdk .forConsole .client .config .endpoint }/account/sessions/oauth2/callback/${provider .key }/${projectId } ` } />
7876 </div >
7977 </FormList >
8078 <svelte:fragment slot =" footer" >
Original file line number Diff line number Diff line change 7272 <div >
7373 <p >URI</p >
7474 <CopyInput
75- value ={` ${
76- sdk .forConsole .client .config .endpoint
77- }/account/sessions/oauth2/callback/${provider .name .toLocaleLowerCase ()}/${projectId } ` } />
75+ value ={` ${sdk .forConsole .client .config .endpoint }/account/sessions/oauth2/callback/${provider .key }/${projectId } ` } />
7876 </div >
7977 </FormList >
8078 <svelte:fragment slot =" footer" >
Original file line number Diff line number Diff line change 7070 <div >
7171 <p >URI</p >
7272 <CopyInput
73- value ={` ${
74- sdk .forConsole .client .config .endpoint
75- }/account/sessions/oauth2/callback/${provider .name .toLocaleLowerCase ()}/${projectId } ` } />
73+ value ={` ${sdk .forConsole .client .config .endpoint }/account/sessions/oauth2/callback/${provider .key }/${projectId } ` } />
7674 </div >
7775 </FormList >
7876 <svelte:fragment slot =" footer" >
Original file line number Diff line number Diff line change 6363 <div >
6464 <p >URI</p >
6565 <CopyInput
66- value ={` ${
67- sdk .forConsole .client .config .endpoint
68- }/account/sessions/oauth2/callback/${provider .name .toLocaleLowerCase ()}/${projectId } ` } />
66+ value ={` ${sdk .forConsole .client .config .endpoint }/account/sessions/oauth2/callback/${provider .key }/${projectId } ` } />
6967 </div >
7068 </FormList >
7169 <svelte:fragment slot =" footer" >
Original file line number Diff line number Diff line change 7272 <div >
7373 <p >URI</p >
7474 <CopyInput
75- value ={` ${
76- sdk .forConsole .client .config .endpoint
77- }/account/sessions/oauth2/callback/${provider .name .toLocaleLowerCase ()}/${projectId } ` } />
75+ value ={` ${sdk .forConsole .client .config .endpoint }/account/sessions/oauth2/callback/${provider .key }/${projectId } ` } />
7876 </div >
7977 </FormList >
8078 <svelte:fragment slot =" footer" >
Original file line number Diff line number Diff line change 6161 </script >
6262
6363<Modal {error } onSubmit ={update } size =" big" show on:close >
64- <svelte:fragment slot ="header" >{provider .name . toUpperCase () } OAuth2 Settings</svelte:fragment >
64+ <svelte:fragment slot ="header" >{provider .name } OAuth2 Settings</svelte:fragment >
6565 <FormList >
6666 <p >
67- To use {provider .name . toUpperCase () } authentication in your application, first fill in this
68- form. For more info you can
67+ To use {provider .name } authentication in your application, first fill in this form. For more
68+ info you can
6969 <a class ="link" href ={provider .docs } target =" _blank" rel =" noopener noreferrer"
7070 >visit the docs.</a >
7171 </p >
110110 <div >
111111 <p >URI</p >
112112 <CopyInput
113- value ={` ${
114- sdk .forConsole .client .config .endpoint
115- }/account/sessions/oauth2/callback/${provider .name .toLocaleLowerCase ()}/${projectId } ` } />
113+ value ={` ${sdk .forConsole .client .config .endpoint }/account/sessions/oauth2/callback/${provider .key }/${projectId } ` } />
116114 </div >
117115 </FormList >
118116 <svelte:fragment slot =" footer" >
Original file line number Diff line number Diff line change 8282 <div >
8383 <p >URI</p >
8484 <CopyInput
85- value ={` ${
86- sdk .forConsole .client .config .endpoint
87- }/account/sessions/oauth2/callback/${provider .name .toLocaleLowerCase ()}/${projectId } ` } />
85+ value ={` ${sdk .forConsole .client .config .endpoint }/account/sessions/oauth2/callback/${provider .key }/${projectId } ` } />
8886 </div >
8987 </FormList >
9088 <svelte:fragment slot =" footer" >
Original file line number Diff line number Diff line change 7575 on:click ={() => {
7676 selectedProvider = provider ;
7777 trackEvent (` click_select_provider ` , {
78- provider: provider .name .toLowerCase ()
78+ provider: provider .key .toLowerCase ()
7979 });
8080 }}>
8181 <div class =" avatar" >
You can’t perform that action at this time.
0 commit comments