myMSALObj.loginPopup(["user.read"]).then(idToken => { const user = myMSALObj.getUser(); this.setState({ authenticated: true, user: user, wait: false }); navigate("/dashboard"); // if you want to direct the user to a page after login });
// Login popup flow provider // Returns IdToken const signIn = () => { return userAgentApplication.loginPopup(applicationConfig.graphScopes) }