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

on the Android side, How to open the login page normally when the application package name contains uppercase letters #877

Open
6 tasks done
cx5168 opened this issue Mar 8, 2024 · 5 comments
Labels
bug This points to a verified bug in the code

Comments

@cx5168
Copy link

cx5168 commented Mar 8, 2024

Checklist

Description

The application package name contains uppercase letters, and callbackUrl has been set to lowercase letters. Setting customScheme cannot open it properly.

I hope to not change the application package name and be able to use auth0 normally.

Please provide some solutions, thank you.

Reproduction

  1. In the auth0 console, callbackUrl has been set to lowercase letters (e.x. com.testapp.auth0://auth0.com/android/com.testapp/callback)
  2. The package name in the application contains uppercase letters (e.x. com.testApp)
  3. Accessing webAuth.authorize, customScheme has been set (e.x. customScheme: com.testApp.auth0)
  4. The app/build.gradle has added the manifestPlaceholders setting (e.x. manifestPlaceholders=[auth0Domain: "auth0.com", auth0Scheme: "${applicationId}.auth0"]). The applicationId is com.testApp.
  5. Android: launchMode="singleTask" has been removed from AndroidManifest.xml

Additional context

No response

react-native-auth0 version

3.1.0

React Native version

0.73.4

Expo version

No response

Platform

Android

Platform version(s)

34

@cx5168 cx5168 added the bug This points to a verified bug in the code label Mar 8, 2024
@cx5168
Copy link
Author

cx5168 commented Mar 11, 2024

Solved it.
Please refer to No.1:https://github.com/auth0/react-native-auth0/blob/master/FAQ.md

@cx5168
Copy link
Author

cx5168 commented Mar 11, 2024

But there is another issue. After the first successful login, the same email will be logged in again and the login page will be automatically skipped.

Please help

1 similar comment
@cx5168
Copy link
Author

cx5168 commented Mar 11, 2024

But there is another issue. After the first successful login, the same email will be logged in again and the login page will be automatically skipped.

Please help

@kulaszewicz
Copy link

@cx5168 Have you solved the issue, and could you provide the details how you solved in in the first comment? I read the first point but it still doesn't work for me.

@cx5168
Copy link
Author

cx5168 commented Apr 10, 2024

@kulaszewicz

  1. On the management side of auth0, set the value of callbackURL to lowercase letters
  2. Delete the manifestPlaceholders setting for app/build.gradle
  3. In AndroidManifest.xml, add the following line
    <activity android:name="com.auth0.android.provider.RedirectActivity" android:exported="true" tools:node="replace"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:host="[your auth0 host]" android:pathPrefix="/android/[Lowercase applicationId. ex: aaa.com]/callback" android:scheme="[Lowercase applicationId. ex: aaa.com].auth0" /> </intent-filter> </activity>
  4. delete the build folder for app
  5. rebuild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

2 participants