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 6dbf1dfa56
commit 469c91cf55

View file

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