Fixed bug with required grant and made allowedUrls optional #312
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After getting 4.0.0 i faced 2 issues:
grantedScopes.split('+'). thing is that IdentityServer4 does not send this information at least in my case (as far as i understand it checks allowed scoped agains issued token on request) so it should be optional.startsWith. So in our case we are calling api without domain e.g. /api on DEV, QA, PROD environments but on localhost we call it with host. This is because on other environments proxy redirect is grabing requests to avoid OPTIONS request since API and web are separated. On other hand on localhost we do not have any proxy so we have to call full url like http://api..../.... So we are ending up mixed situations. We could change this check with indexOf but this is not very good options because different urls can have parts of allowed urls. So I made it optional. I think it should not cause any issues or penalties.hasValidIdToken()callQuestion - how soon can we release fixes because our team is hardly depend on them :)