@dev-crew-berlin/enter-js-utils 0.60.3 → 0.60.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -37,7 +37,7 @@ export default class APIBase {
|
|
|
37
37
|
},
|
|
38
38
|
privateKey: user.key
|
|
39
39
|
});
|
|
40
|
-
const scopes = ['openid', 'profile', `urn:zitadel:iam:org:project:id:${oidc.projectId}:aud`];
|
|
40
|
+
const scopes = ['openid', 'profile', 'urn:zitadel:iam:user:metadata', `urn:zitadel:iam:org:project:id:${oidc.projectId}:aud`];
|
|
41
41
|
try {
|
|
42
42
|
const res = await fetch(`${oidc.url}/oauth/v2/token`, {
|
|
43
43
|
method: 'POST',
|
package/dist/lib/tokens.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ export declare type TokenOptions = {
|
|
|
4
4
|
jwtSecret: string;
|
|
5
5
|
instanceName: string;
|
|
6
6
|
};
|
|
7
|
-
export declare
|
|
7
|
+
export declare const tokenValidationErrorCodes: readonly ["token_missing", "token_invalid", "token_expired", "security_question_check_failed"];
|
|
8
|
+
export declare type TokenValidationError = typeof tokenValidationErrorCodes[number];
|
|
8
9
|
export declare type RegistrationTokenOptions = {
|
|
9
10
|
registrationTokenCookieName?: string;
|
|
10
11
|
};
|
package/dist/lib/tokens.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import jws from 'jws';
|
|
2
2
|
import { failure, success } from './result';
|
|
3
|
+
export const tokenValidationErrorCodes = ['token_missing', 'token_invalid', 'token_expired', 'security_question_check_failed'];
|
|
3
4
|
const REGISTRATION_TOKEN_COOKIE_NAME = 'enter-frontend.registation-token';
|
|
4
5
|
function parseJWS(tokenString, options) {
|
|
5
6
|
if (!tokenString) return failure('token_missing');
|