File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -114,9 +114,15 @@ const generateCodeChallenge = (codeVerifier) => {
114114const getAuthUrl = ( codeVerifier , state ) => {
115115 const codeChallenge = generateCodeChallenge ( codeVerifier )
116116 const nonce = storeStateObject ( state )
117+
118+ const { dataset_name = '' } = state
119+ const agentid = dataset_name . split ( '/' ) [ 0 ]
120+ const agentidParam = agentid ? `&agentid=${ agentid } ` : ''
121+
117122 return `${ process . env . REACT_APP_BASE_SITE } /oauth/authorize?client_id=${ process . env . REACT_APP_OAUTH_CLIENT_ID } ` +
118123 `&redirect_uri=${ process . env . REACT_APP_OAUTH_REDIRECT_URI } ` +
119124 `&response_type=code&code_challenge_method=S256&code_challenge=${ codeChallenge } ` +
125+ `${ agentidParam } ` +
120126 `&state=${ encodeURIComponent ( nonce ) } `
121127}
122128
You can’t perform that action at this time.
0 commit comments