bbookman / Snapchat-Snap-Kit-DIY-Docs

MIT License
18 stars 0 forks source link

Error Login: Invalid redirect_uri #9

Closed congdanh1608 closed 4 years ago

congdanh1608 commented 4 years ago

Hi, I am using the Snapkit login with the development environment client key, everything works well. But when I try to use the production environment client key, I always get the error "Something went wrong - Invalid redirect_uri". I don't change redirect uri between development and production environment.

My App on Snapkit dashboard was approved. I also tried on the snapkit demo project also. But I get the same issue.

Here is my redirect uri: snapfriends://com.snapfriends.app/login

Androidmainifest

    <activity
        android:name="com.snapchat.kit.sdk.SnapKitActivity"
        android:launchMode="singleTask">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <!--snapfriends://com.snapfriends.app/login-->
            <data
                android:host="com.snapfriends.app"
                android:pathPrefix="/login"
                android:scheme="snapfriends" />
        </intent-filter>

    </activity>

    <!-- <meta-data
    <!--snapkit-->
    <meta-data
        android:name="com.snapchat.kit.sdk.clientId"
        android:value="@string/snapkit_client_id" />  (I hide this client id on here)
    <meta-data
        android:name="com.snapchat.kit.sdk.redirectUrl"
        android:value="snapfriends://com.snapfriends.app/login" />
    <meta-data
        android:name="com.snapchat.kit.sdk.scopes"
        android:resource="@array/snap_connect_scopes" />

snap_connect_scopes

https://auth.snapchat.com/oauth2/api/user.display_name https://auth.snapchat.com/oauth2/api/user.bitmoji.avatar https://auth.snapchat.com/oauth2/api/user.external_id

Do you have any ideas to solve this issue? Thank you. @bbookman

congdanh1608 commented 4 years ago

We found a button to do switch my app to "Live" after approved. Thanks