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 @@ -11,6 +11,7 @@ import Oidc from '../../routes/console/project-[project]/auth/oidcOAuth.svelte';
1111import Okta from '../../routes/console/project-[project]/auth/oktaOAuth.svelte' ;
1212
1313export type Provider = Models . Provider & {
14+ key : string ;
1415 icon : string ;
1516 docs ?: string ;
1617 component ?: typeof SvelteComponent ;
@@ -23,11 +24,12 @@ export type Providers = {
2324const setProviders = ( project : Models . Project ) : Provider [ ] => {
2425 return (
2526 project ?. providers . map ( ( n ) => {
27+ let p = n as Models . Provider & { key : string } ;
2628 let docs : Provider [ 'docs' ] ;
27- let icon : Provider [ 'icon' ] = n . name . toLowerCase ( ) ;
29+ let icon : Provider [ 'icon' ] = p . key . toLowerCase ( ) ;
2830 let component : Provider [ 'component' ] = Main ;
2931
30- switch ( n . name . toLowerCase ( ) ) {
32+ switch ( p . key . toLowerCase ( ) ) {
3133 case 'amazon' :
3234 docs = 'https://developer.amazon.com/apps-and-games/services-and-apis' ;
3335 break ;
@@ -154,7 +156,7 @@ const setProviders = (project: Models.Project): Provider[] => {
154156 }
155157
156158 return {
157- ...n ,
159+ ...p ,
158160 icon,
159161 docs,
160162 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 =" image-item" >
You can’t perform that action at this time.
0 commit comments