Skip to content

Commit

Permalink
strip trailing slash from oauth issuers
Browse files Browse the repository at this point in the history
  • Loading branch information
ruddell committed Nov 22, 2021
1 parent 5dcdd0a commit 0e53f3d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import AuthInfoActions from '../reducers/auth-info.reducer';
export function* getAuthInfo(api) {
const authInfo = yield call(api.getOauthInfo);
if (authInfo.ok) {
if (authInfo.data.issuer && authInfo.data.issuer.endsWith('/')) {
authInfo.data.issuer = authInfo.data.issuer.substring(0, authInfo.data.issuer.length - 1);
}
yield put(AuthInfoActions.authInfoSuccess(authInfo.data));
} else {
let errorMessage = authInfo.data && authInfo.data.detail ? authInfo.data.detail : 'Failed to reach backend API';
Expand Down

0 comments on commit 0e53f3d

Please sign in to comment.