whitelistedDomains as a promise
See original GitHub issueHi, is there any way to pass whitelistedDomains as a promise? The example bellow jwtOptionsFactory receives AppConfigService which returns the domain value. Just for the record, the service is provided as APP_INITIALIZER.
export function jwtOptionsFactory(appConfig: AppConfigService) {
return {
tokenGetter: TokenHelper.getToken,
headerName: 'token',
authScheme: '',
whitelistedDomains: [appConfig.domain],
blacklistedRoutes: []
};
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:13
Top Results From Across the Web
Can I restrict Outbound Mail to Whitelisted Domains only.
We are trying to create an environment where our team members/consultants will be allowed to email across to certain customers only.
Read more >Angular6 angular-jwt not adding token to request headers
am using angular-jwt to intercept my requests and add the JWT token, but that doesn't seem to be happening. This is my angular...
Read more >How to Do JWT Authentication with an Angular 6 SPA - Toptal
The whiteListedDomains option exists so you can restrict which domains the JWT gets sent to, so public APIs don't receive your JWT as...
Read more >angular-jwt-async - npm Package Health Analysis - Snyk
Allows for async promises for whitelist and blacklist For more information ... that you want to make requests to by specifying a whitelistedDomains...
Read more >More Security Using Domain Filtering
... and check it against the array of whitelisted domains for a given user/client. ... gi, '') === args.domain)) === -1) { return...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This feature is exactly what my app needs. My app is hosted on a node server that contains a relative endpoint,
/configuration
, which returns the location of our API, which lives on a different domain. This allows us to use a node environment variable on the node server to configure what API our app should make all its API calls to. As such, we don’t know what domain to whitelist until ourAPP_INITIALIZER
makes the call to/configuration
. For this reason, we need this feature…we needwhitelistedDomains
to support Promises and/or Observables.I’d like to know whether this is possible as well.
This would be extremely helpful for use cases where the URL for the application’s backend is dynamically configurable and needs to be retrieved from the application’s assets, for example.