File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,9 +30,10 @@ export class SignInButton extends Component {
3030
3131 this . setState ( { clicked : true } ) ;
3232
33+ const frontendOrigin = window . env . REACT_APP_URL || window . location . origin ;
3334 const loginUrl = `${ window . env . REACT_APP_SERVER_OAUTH_URL } ${ encodeURIComponent (
3435 this . props . history ?. location ?. pathname + this . props . history ?. location ?. search ,
35- ) } `;
36+ ) } &redirect_uri= ${ encodeURIComponent ( frontendOrigin ) } `;
3637
3738 fetch ( loginUrl )
3839 . then ( async ( result ) => {
Original file line number Diff line number Diff line change @@ -316,7 +316,8 @@ export const fetchBasicUser = function (userId) {
316316 * @param authCode - the token
317317 */
318318export const callback = async ( authCode , dispatch , push ) => {
319- const resetURI = `${ window . env . REACT_APP_MAP_ROULETTE_SERVER_URL } /auth/callback?code=${ authCode } ` ;
319+ const frontendOrigin = window . env . REACT_APP_URL || window . location . origin ;
320+ const resetURI = `${ window . env . REACT_APP_MAP_ROULETTE_SERVER_URL } /auth/callback?code=${ authCode } &redirect_uri=${ encodeURIComponent ( frontendOrigin ) } ` ;
320321
321322 // Since we're bypassing Endpoint and manually performing an update, we
322323 // need to also manually reset the request cache.
You can’t perform that action at this time.
0 commit comments