Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
processAuthentication() {
// Complete the OAuth2 process. If in a popup, the window will close before
// this finishes and will be handled by the beginOAuth2 function. If not in
// a popup, it will proceed to the next couple lines.
const session = UserSession.completeOAuth2({
// Required as it is a piece of the key in the popup method. If not using
// a popup, this shouldn't be required.
clientId: this.clientId
});
// Update the application store with the new session.
this.$store.dispatch("updateSession", session);
// The app is the rerouted to the main application.
this.$router.replace("/");
}
}