-
Notifications
You must be signed in to change notification settings - Fork 74
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
Dynamically get config (app IDs) from backend #24
Comments
@MikeDabrowski Did you find any workaround for this? |
@kavithamadhavaraj in app.module.ts:
|
@MikeDabrowski But I still see the App IDs in app.module.ts. It is not a good idea to expose the secret information to client side. What I was thinking is to get it from the server side code. Thanks anyways. |
Well, I'm fetching ids from backend because I want them to be easily swapped without changing the code. I don't think you can completely hide id from the client. If you worry about the ID that stays in that global variable APP_IDS you can alwas clean it up after library has been initialized, though, I think it would be hard to dig through bundled code to get those ids. |
@MikeDabrowski Understood 👍 Thanks for explaining :) |
@MikeDabrowski If your intention is to get the App IDs without changing the code, why can't they go into environment.ts file? You can read from them like this.
Just being curious to know, if this won't work for your case. |
Well it should work but in our project's frontend part it would be the first and only prop set that way. All others are loaded from backend and people are used to maintain them between environments. Another reason is that this exact frontend app is a bit crippled - it is embeded in sort of 'hacky' way into vue app wich caused problems in the past. To solve them we cut few parts of bootstraping process. I'm afraid using environment could simply not work here. |
Hi, thank you for such a nice util library. I need to dynamically create AuthServiceConfig by fetching app ids from backend. How can I do that ?
In app.module how can I provide settings as observable/promise ?
The text was updated successfully, but these errors were encountered: