-
Notifications
You must be signed in to change notification settings - Fork 232
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
Adding support for custom navigators? #1147
Comments
For an integration with Capacitor, you can check my comment here: #537 Integration with Capacitor. You can also use the VanillaJS version of my library (which is a wrapper around oidc-client-ts) as a "ready to use" solution and integrate it in your React app. Or even better, make a PR to support React as it was done with Angular. |
We've already got wrappers around this Lib for RTK support. I do think custom Navigators via the settings object is the cleanest approach and could be built in to extend other solutions other than capacitor? |
if the changes are not that invasive i am open for that. The idea is that this library can also be used as a SDK like library, which can be extended easily. |
This test here: JSON.stringify's settings, which I added the Navigators too, but their constructors expect settings, so you get a nice:
Weirdly you can reduce the test's body to:
And it passes, not exactly sure what they That test was the only issue it seems, removing that |
I'm going to do a full build iOS of my app using custom Navigators (redirect and iframe, for silent renew) using @Badisi 's capacitor logic as a base for the custom navigators. I put the initial PR up for feedback on the approach rather than it to be fully ready to merge. As I may have missed something key in my understanding. |
Overriding @Badisi have you hit an issue with Capacitor Http and |
This issue is related to Capacitor 5 which was released 4 months ago. I have upvoted the issue #6792 and asked for clarification and high priority. |
How can i use the custom navigators? It is possible to use Capacitor Browser Plug-In now? Is so, how can i do it? :) |
@Excel1, I explained how this can be achieved in the second post of this thread... ☝️ |
@Badisi thanks for help. I think it should be a good feature for oidc-client.ts since Apple forces by app publishment to use the safari api browser for redirection |
Would the maintainers be open to another PR focused at adding support for custom navigators? (Kinda did ok on the storage engine one, working well in a product with Electron!)
Scenario:
Building a React + Ionic + Capacitor app for iOS. It kinda works ok if you let it leave the app and redirect back.
Ideal solution is to use the Capacitor Browser plug-in to open it without leaving the app.
My idea:
Add 3 new settings to "UserManagerSettings".
That either get defaulted to the existing if not defined like here:
https://github.com/authts/oidc-client-ts/blob/main/src/UserManagerSettings.ts#L187
Then alter here to use the values from "UserManagerSettings":
https://github.com/authts/oidc-client-ts/blob/main/src/UserManager.ts#L98
The text was updated successfully, but these errors were encountered: