@stfalcon/vue-bank-id-se
Version:
Component, which allows to simply implement swedish bankId at vue. It integrates with mobile app: - if vue app is openned on mobile, then performes redirect to mobile BankId app by clicking on vue-bank-se component. And when user authenticates, mobile app
28 lines (22 loc) • 608 B
JavaScript
import ActorMixin from './strategy-mixin';
export default {
name: 'Redirect',
mixins: [ActorMixin],
created() {
const url = new URL(location.href);
const ref = url.searchParams.get('orderRef');
if (ref) {
this.requestSession(ref);
}
},
methods: {
generateUrl({ autoStartToken: tk, orderRef: oref }) {
// const loc = location.href;
// return `bankid:///?autostarttoken=${tk}&redirect=${loc}?orderRef=${oref}`;
return `bankid:///?autostarttoken=${tk}&redirect=null`;
},
performActorForUrl(url) {
window.location.href = url;
}
},
}