Abp: Swagger UI login feature.

Created on 9 Oct 2019  路  9Comments  路  Source: abpframework/abp

Most helpful comment

We should provide a class library to reuse swagger login functionality. (js,html...)

Such as:

app.UseSwagger();
app.UseSwaggerUIWithAbpLogin(//config);

All 9 comments

Are you planning to do it the old way like zero?
Use a mvc page to do the login, and share cookies and stuff with swagger?

I have simply implemented it, using password grant type of Identity Server.

Of course this may need to be enhanced or replaced with other methods.

see https://github.com/abpframework/abp/compare/maliming/swagger

I try it and chrome blocked by CORS
image

close chrome CORS policy and it work.
but this way so ugly

There seems to be a problem with your configured cors, see https://docs.microsoft.com/en-us/aspnet/core/security/cors?view=aspnetcore-3.0

We should provide a class library to reuse swagger login functionality. (js,html...)

Such as:

app.UseSwagger();
app.UseSwaggerUIWithAbpLogin(//config);

@maliming what is the status/priority of this feature?

hi @leonkosak

it's still in the backlog.

Was this page helpful?
0 / 5 - 0 ratings