I have a question about Bearer Token on asp.net WebApi. I've been creating WebApi's but just to be consumed by some client(Android,iOS), but now I need to create a Login page in this same project and I don't know how to handle this, since once using a client app, i just make a request to api/token and get the access token, but how to get this from a Web Page? Do I need to use some back-end like NodeJs or AngularJS ?
This is the endpoint :
app.UseOAuthAuthorizationServer(new OAuthAuthorizationServerOptions()
{
TokenEndpointPath = new PathString("/Token"),
Provider = new ApplicationOAuthProvider(),
AccessTokenExpireTimeSpan = TimeSpan.FromDays(300),
AllowInsecureHttp = true
});
api/tokenand the bearer token should be returned in the headers or body depending on how you return it?HttpClientfrom C#. I'm new with web-side thing. So with Angular should solve my problem ?