Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

Force login #28

Open
svrooij opened this issue Mar 7, 2016 · 0 comments
Open

Force login #28

svrooij opened this issue Mar 7, 2016 · 0 comments

Comments

@svrooij
Copy link

svrooij commented Mar 7, 2016

I would like to force authentication to all users accessing the admin page.
As with other Owin apps, this can be done by adding the following code.

adminApp.Use(async (context, next) =>
  {
    var user = context.Authentication.User;
    if (user == null || user.Identity == null || !user.Identity.IsAuthenticated)
    {
      context.Authentication.Challenge();
      return;
    }
    await next();
});

This actually redirects all the users to our ADFS server, but this will still show the main page (with a login button). Is their a way to actually log the user in in IdentityAdmin without them pressing the login button?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant