From 700b5072c9d1d12e93a806cc48a897a04a949233 Mon Sep 17 00:00:00 2001 From: Gary Gambill Date: Fri, 13 Dec 2019 19:49:39 -0600 Subject: [PATCH] fix base64UrlSafe string replacement bug --- src/ios/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ios/utils.ts b/src/ios/utils.ts index 45a95e3..e99893f 100644 --- a/src/ios/utils.ts +++ b/src/ios/utils.ts @@ -23,9 +23,9 @@ export function a0_encodeBase64URLSafe(dataOrString: NSData | string): string { data = text.dataUsingEncoding(NSUTF8StringEncoding); } return data.base64EncodedStringWithOptions(0) - .replace('+', '-') - .replace('/', '_') - .replace('=', ''); + .replace(/\+/g, '-') + .replace(/\//g, '_') + .replace(/=/g, ''); } export function a0_url(domain: string): NSURL {