mirror of
https://github.com/plankanban/planka.git
synced 2025-07-24 15:49:46 +02:00
feat: Improve OIDC support for strict providers (#824)
This commit is contained in:
parent
042ab0a63a
commit
d45cbeb0fb
5 changed files with 34 additions and 6 deletions
|
@ -11,6 +11,7 @@ module.exports = {
|
|||
},
|
||||
|
||||
exits: {
|
||||
invalidUserInfoSignature: {},
|
||||
invalidCodeOrNonce: {},
|
||||
missingValues: {},
|
||||
emailAlreadyInUse: {},
|
||||
|
@ -34,6 +35,10 @@ module.exports = {
|
|||
);
|
||||
userInfo = await client.userinfo(tokenSet);
|
||||
} catch (e) {
|
||||
if (e instanceof SyntaxError && e.message.includes('Unexpected token e in JSON at position 0')) {
|
||||
sails.log.warn('Error while exchanging OIDC code: userInfo response is signed.');
|
||||
throw 'invalidUserInfoSignature';
|
||||
}
|
||||
sails.log.warn(`Error while exchanging OIDC code: ${e}`);
|
||||
throw 'invalidCodeOrNonce';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue