@dev-crew-berlin/enter-js-utils 0.60.3 → 0.60.4

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.
@@ -4,7 +4,8 @@ export declare type TokenOptions = {
4
4
  jwtSecret: string;
5
5
  instanceName: string;
6
6
  };
7
- export declare type TokenValidationError = 'token_missing' | 'token_invalid' | 'token_expired' | 'security_question_check_failed';
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
  };
@@ -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');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-crew-berlin/enter-js-utils",
3
- "version": "0.60.3",
3
+ "version": "0.60.4",
4
4
  "description": "utils such as vaildation and other helpers to work with data from the enter app",
5
5
  "files": [
6
6
  "dist",