Skip to content

Commit

Permalink
use safebtoa instead of btoa
Browse files Browse the repository at this point in the history
  • Loading branch information
arch1995 committed Sep 20, 2023
1 parent 14a5a90 commit 304d8af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handlers/AbstractLoginHandler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BroadcastChannel } from "@toruslabs/broadcast-channel";
import base64url from "base64url";

import { LOGIN_TYPE, UX_MODE, UX_MODE_TYPE } from "../utils/enums";
import { broadcastChannelOptions, getTimeout, randomId } from "../utils/helpers";
Expand Down Expand Up @@ -26,7 +27,7 @@ abstract class AbstractLoginHandler implements ILoginHandler {

get state(): string {
return encodeURIComponent(
window.btoa(
base64url.encode(
JSON.stringify({
...(this.customState || {}),
instanceId: this.nonce,
Expand Down

0 comments on commit 304d8af

Please sign in to comment.