Skip to content

Update dependencies and enhance webAuth methods to support HTTPS #1125

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

subhankarmaiti
Copy link
Contributor

@subhankarmaiti subhankarmaiti commented Apr 7, 2025

Changes

  • Update dependencies and enhance webAuth methods to support HTTPS

References

Checklist

@subhankarmaiti subhankarmaiti requested a review from a team as a code owner April 7, 2025 05:05
@subhankarmaiti subhankarmaiti requested a review from Copilot April 7, 2025 05:11
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • ios/A0Auth0.m: Language not supported
  • ios/NativeBridge.swift: Language not supported

@@ -113,13 +117,17 @@ class Agent {
);
let redirectUri =
options.returnToUrl ?? this.callbackUri(parameters.domain, scheme);

// Determine if we should use HTTPS
const useHTTPS = scheme.startsWith('https');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is passing customeScheme only way the user can set https scheme ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes keeping same implementation fro android and iOS.

EXAMPLES.md Outdated
- [Accept user invitations](#accept-user-invitations)
- [Bot Protection](#bot-protection)
- [Domain Switching](#domain-switching)
- [Examples using react-native-auth0](#examples-using-react-native-auth0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The top-level link (the title) does not seem to be necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happened due to VS code auto format feature on save. Its updating my md file without any warning. Reverted back to prev.

EXAMPLES.md Outdated
Comment on lines 178 to 180
Register https://yourdomain.com/{YOUR_APP_BUNDLE_ID}/{PLATFORM}/callback as an allowed callback URL in your Auth0 Dashboard
Configure your app to handle Universal Links (iOS) and App Links (Android)
Set up your domain with proper verification for these deep linking mechanisms
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Register https://yourdomain.com/{YOUR_APP_BUNDLE_ID}/{PLATFORM}/callback as an allowed callback URL in your Auth0 Dashboard
Configure your app to handle Universal Links (iOS) and App Links (Android)
Set up your domain with proper verification for these deep linking mechanisms
1. Register https://yourdomain.com/{YOUR_APP_BUNDLE_ID}/{PLATFORM}/callback as an allowed callback URL in your Auth0 Dashboard.
2. Configure your app to handle Universal Links (iOS) and App Links (Android).
3. Set up your domain with proper verification for these deep linking mechanisms.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, Auth0 already supports configuring (3) for the developer. They just need to configure some values in their Auth0 application's configuration on the Dashboard. We should mention this here and point to some docs pages with more specific instructions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also works with the tenant subdomain, eg. some-tenant.us.auth0.com

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the examples.

@Widcket
Copy link
Contributor

Widcket commented Apr 11, 2025

BTW, HTTPS callbacks should be the default and recommended option for Web Auth on iOS, so the README setup instructions should be updated accordingly. E.g.: https://github.com/auth0/Auth0.swift#configure-web-auth-ios--macos

@Widcket
Copy link
Contributor

Widcket commented Apr 11, 2025

(after which the instructions on EXAMPLES.md will be redundant, so these should be removed)

EXAMPLES.md Outdated

1\. Register [https://yourdomain.com/{YOUR\_APP\_BUNDLE\_ID}/{PLATFORM}/callback](https://yourdomain.com/{YOUR_APP_BUNDLE_ID}/{PLATFORM}/callback) as an allowed callback URL in your Auth0 Dashboard
2\. Configure your app to handle Universal Links \(iOS\) and App Links \(Android\)
3\. Set up your domain with proper verification for these deep linking mechanisms
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set up your domain with proper verification for these deep linking mechanisms

This can be confusing for the customers, since this seems to imply that this requires a custom domain, when it's not the case. Also, we should link to proper documentation explaining how to do this setup. Otherwise, it's not really helpful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, this doesn't actually belong here. First, this is already being explained in the README's setup instructions. Second, this is inside the Authentication API's examples section, when it's about Web Auth.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this should be removed.

```
This configuration allows your iOS app to handle Universal Links properly.

Refer to the example of [Using custom scheme for web authentication redirection](https://github.com/auth0/react-native-auth0/blob/master/EXAMPLES.md#using-custom-scheme-for-web-authentication-redirection)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing the Configure the Team ID and bundle identifier part, as explained here: https://github.com/auth0/Auth0.swift#configure-the-team-id-and-bundle-identifier

I understand that it's explained in https://auth0.com/docs/get-started/applications/enable-universal-links-support-in-apple-xcode, but we should minimize the levels of indirection for essential setup instructions.

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

Successfully merging this pull request may close these issues.

3 participants