vendredi 7 décembre 2018

Has anyone ever used flask-security user authentication in python that is linked to C#?

This is the current design:

    [HttpPost]
    public async Task<ActionResult> Login(string email, string password)
    {
        bool login_result = await _accountService.LoginExist(email, password);

        if (login_result)
        {
            FormsAuthentication.SetAuthCookie(email, false);
            return Redirect(Request.UrlReferrer.ToString());
        }

        return Redirect("Register");
    }

As you can see, any activated user can login and see more stuff than the public. However, the goal is to see different stuff based on different roles upon user login. I wonder if anyone has implemented similar things.




Aucun commentaire:

Enregistrer un commentaire