Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AbpStrictRedirectUriValidator to compatible with tenant name in domain. #7783

Merged
merged 3 commits into from Feb 26, 2021

Conversation

maliming
Copy link
Member

@maliming maliming commented Feb 19, 2021

The problem:

The Authorize endpoint redirect URL of IdentityServer must exist in the database.
The redirect URL is dynamic when mvc or angular resolves tenants from the domain name.

https://tenant1.ng.abp.io
https://tenant2.ng.abp.io

Solution

I rewrote the StrictRedirectUriValidator of Identity server to make it support domain format.

Configure<AbpTenantResolveOptions>(options =>
{
    options.AddDomainTenantResolver("{0}.api.abp.io");
});

services.AddAbpStrictRedirectUriValidator();

This requires the developer to add new client redirect URLs

image

@maliming maliming added this to the 4.3-preview milestone Feb 19, 2021
@maliming maliming marked this pull request as draft February 19, 2021 12:46
@maliming maliming marked this pull request as ready for review February 19, 2021 14:34
@maliming maliming requested review from hikalkan and removed request for hikalkan February 19, 2021 14:35
@seregagorl
Copy link

Thank you @maliming and @hikalkan for acting on our request so promptly!

@maliming
Copy link
Member Author

hi @seregagorl

There is IssuerValidator that can compatible with the tenant name in the domain(Issuer).

https://gist.github.com/maliming/37193c20c2bea4c4779164d95b42d8f7

@hikalkan hikalkan merged commit 3fef2e5 into dev Feb 26, 2021
@hikalkan hikalkan deleted the maliming/ids-redirect-urls branch February 26, 2021 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants