diff options
Diffstat (limited to 'packages/taler-util/src/http-client/types.ts')
-rw-r--r-- | packages/taler-util/src/http-client/types.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/taler-util/src/http-client/types.ts b/packages/taler-util/src/http-client/types.ts index a2f709769..77b7e2c2a 100644 --- a/packages/taler-util/src/http-client/types.ts +++ b/packages/taler-util/src/http-client/types.ts @@ -203,7 +203,7 @@ export type AccessToken = string & { */ export function createAccessToken(token: string): AccessToken { return ( - token.startsWith("secret-token:") ? token : `secret-token:${token}` + token.startsWith("secret-token:") ? token : `secret-token:${encodeURIComponent(token)}` ) as AccessToken; } /** @@ -215,7 +215,7 @@ export function createAccessToken(token: string): AccessToken { */ export function createRFC8959AccessToken(token: string): AccessToken { return ( - token.startsWith("secret-token:") ? token : `secret-token:${token}` + token.startsWith("secret-token:") ? token : `secret-token:${encodeURIComponent(token)}` ) as AccessToken; } /** |