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 Capactior support for native mobile apps #1

Open
hmoazzem opened this issue Aug 27, 2024 · 0 comments
Open

Add Capactior support for native mobile apps #1

hmoazzem opened this issue Aug 27, 2024 · 0 comments

Comments

@hmoazzem
Copy link
Member

When it comes to OIDC/OAtuh2 in CapacitorJS, the best option probably is https://github.com/capacitor-community/generic-oauth2.

If we're fine using smartphones's default browser (as opposed to UX friendly in-app browser), all we have to do is adjust redirect_uri depending on the platform. Here's snippet from earlier attempt for keycloakjs

this.isIos = Capacitor.isNativePlatform() && Capacitor.getPlatform() === 'ios';
this.isAndroid = Capacitor.isNativePlatform() && Capacitor.getPlatform() === 'android';
this.redirectUri = this.isIos || this.isAndroid ? this.config.redirectUri : (this.config.redirectUriWeb || this.config.redirectUri);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant