Fix using Buffer on window scope (#6324)

* Update 2fa.vue

* Import 'core-js/es/typed-array/from'

* Bye polyfill
This commit is contained in:
Acid Chicken (硫酸鶏) 2020-05-06 18:59:58 +09:00 committed by GitHub
parent 766c00c305
commit 778ac79c44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -208,11 +208,11 @@ export default Vue.extend({
challengeId: registration.challengeId,
stage: 0,
publicKeyOptions: {
challenge: Buffer.from(
registration.challenge
.replace(/\-/g, "+")
.replace(/_/g, "/"),
'base64'
challenge: Uint8Array.from(
atob(registration.challenge
.replace(/\-/g, '+')
.replace(/_/g, '/')),
x => x.charCodeAt(0),
),
rp: {
id: hostname,