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

No uri registered to handle redirect or multiple applications registered #100

Closed
albka1986 opened this issue Sep 18, 2019 · 11 comments
Closed

Comments

@albka1986
Copy link

albka1986 commented Sep 18, 2019

How to deal with the error:
E/SyncWebAuthClientImpl:No uri registered to handle redirect or multiple applications registered

I've set config:

config = OIDCConfig.Builder()
.clientId(“id here”)
.redirectUri(“https://domain.okta.com/login/callback”)
.endSessionRedirectUri(“https://domain.okta.com/login/callback”)
.scopes(“openid”, “profile”, “offline_access”)
.discoveryUri(“https://domain.okta.com”)
.create()

and

android.defaultConfig.manifestPlaceholders = [
“appAuthRedirectScheme”: “com.okta.domain”
]

Data was taken from there:
http://prntscr.com/p7nz29
I stuck with this, please help.

@FeiChen-okta
Copy link
Contributor

In your org settings you can remove "https://" from the URIs
then setup config:

config = OIDCConfig.Builder()
.clientId(“id here”)
.redirectUri(“domain.okta.com/login/callback”)
.endSessionRedirectUri(“domain.okta.com/login/callback”)
.scopes(“openid”, “profile”, “offline_access”)
.discoveryUri(“https://domain.okta.com”)
.create()

and

android.defaultConfig.manifestPlaceholders = [
“appAuthRedirectScheme”: “domain.okta.com”
]

@albka1986
Copy link
Author

Unfortunately, It doesn't help me. I get the same error:
No uri registered to handle redirect or multiple applications registered

My current config:

config = OIDCConfig.Builder()
            .clientId("0oa1b93ai3SmmP0me357")
            .redirectUri("domain.okta.com/login/callback")
            .endSessionRedirectUri("domain.okta.com/login/logout")
            .scopes("openid", "profile", "offline_access")
            .discoveryUri("https://domain.okta.com")
            .create()

and

 android.defaultConfig.manifestPlaceholders = [
                "appAuthRedirectScheme": "domain.okta.com"
        ]

@FeiChen-okta
Copy link
Contributor

Heres a config of my sample:

Screen Shot 2019-09-19 at 9 18 50 AM

config = OIDCConfig.Builder()
            .clientId("CLIENT_ID")
            .redirectUri("com.first.sample:/callback")
            .endSessionRedirectUri("com.first.sample:/logout")
            .scopes("openid", "profile", "offline_access")
            .discoveryUri("https://com.first.sample")
            .create()
 android.defaultConfig.manifestPlaceholders = [
                "appAuthRedirectScheme": "com.first.sample"
        ]

Since you have the scope offline_access make sure you have Refresh token checked.

Also check that you don't have multiple apps with the same redirect scheme:

#adb shell dumpsys package | grep com.first.sample
adb shell dumpsys package | grep manifestScheme

@albka1986
Copy link
Author

I had removed the "https://" from my code and from OKTA Admin Panel and it helped me. Thanks!

@yahmi
Copy link

yahmi commented Aug 10, 2021

hello ,
I followed all steps and still have the same problem could you tell me please where is the problem @albka1986 @JayNewstrom

{
"client_id": "0oa1fsebdxO8R63eu5d7",
"redirect_uri": "com.okta.dev-00357442:/callback",
"end_session_redirect_uri": "com.okta.dev-00357442:/logout",
"scopes": [
"openid",
"profile",
"offline_access"
],
"discovery_uri": "dev-00357442.okta.com"
}

@NikitaAvraimov-okta
Copy link
Contributor

@yahmi can you make sure you have added redirect scheme to build.gradle and have no apps currently installed with same redirect sheme, please

@yahmi
Copy link

yahmi commented Aug 10, 2021

@NikitaAvraimov-okta yes i did all these steps but not working

@yahmi
Copy link

yahmi commented Aug 13, 2021

@NikitaAvraimov-okta @JayNewstrom
hello ,
Even the simple for web sign on , i put the configuration and I get the same error

@JayNewstrom
Copy link
Contributor

@yahmi could you look at the comment from this similar issue: #233 (comment)

If you can provide more information, I'd be happy to help.

@yahmi
Copy link

yahmi commented Sep 3, 2021

@JayNewstrom fixed with @NikitaAvraimov-okta thanks a lot

@MeghaR2408
Copy link

Hi, I'm also getting the same error, please review my configuration & let me know, what am I doing wrong here:

Build Gradle
manifestPlaceholders = [ "webAuthenticationRedirectScheme": parseScheme(oktaProperties.getProperty('signInRedirectUri')), "appAuthRedirectScheme": "com.okta.dev-44517624" ]

Configuration File

`package sample.okta.android

internal object Configuration {
const val SIGN_IN_REDIRECT_URI: String = "com.okta.dev-44517624:/callback"
const val SIGN_OUT_REDIRECT_URI: String = "com.okta.dev-44517624:/callback"
const val CLIENT_ID: String = "0oa6s2vycxfdOvMuQ5d7"
const val ISSUER: String = "https://dev-44517624.okta.com/oauth2/default"
const val DEFAULT_SCOPE: String = "openid email profile offline_access device_sso"
const val DISCOVERY_URI: String = "https://com.okta.dev-44517624"
}`

Build Method

var oidcConfig = OIDCConfig.Builder() .clientId(Configuration.CLIENT_ID) .redirectUri(Configuration.SIGN_IN_REDIRECT_URI) .endSessionRedirectUri(Configuration.SIGN_OUT_REDIRECT_URI) .scopes("openid", "profile", "offline_access", "email", "device_sso") .discoveryUri(Configuration.DISCOVERY_URI) .create()

rajdeepnanua-okta pushed a commit that referenced this issue Dec 14, 2023
* Fixes react native java imports

* fix: Adds Swift version to podspec

OKTA-371911
<<<Jenkins Check-In of Tested SHA: 81087ea49008251e1cdedd78559ae7f124f2f72c for eng_productivity_ci_bot_okta@okta.com>>>
Artifact: okta-react-native

* fix: Adds types/index.d.ts into files array

OKTA-371431
<<<Jenkins Check-In of Tested SHA: 7b7c2e3b1aa447829c87731df5fb355ae44122ba for eng_productivity_ci_bot_okta@okta.com>>>
Artifact: okta-react-native

* 1.9.1 changelog (#83)

* 1.9.1 changelog

* 1.9.1 Update Changelog

* 1.9.1 Update Changelog

Co-authored-by: Oleg Gnidets <oleg.gnidets@okta.com>

* bump package version: 1.9.1

* fix: Fixes "types" parameter in package.json

Note for the future: To check whether a file is visible in a package, make `yarn pack` and then `yarn add {path-to-archive}`.

OKTA-371431
<<<Jenkins Check-In of Tested SHA: 7420307c4c434bc14c7b83ac12c5575bfcf2f212 for eng_productivity_ci_bot_okta@okta.com>>>
Artifact: okta-react-native

* chore: Bump package version - 1.9.2 (#92)

* fix: Fixes a script to add support of file copying

The `build.js` script doesn't preserve file' folder. For example, `types/index.d.ts` is copied into `dist/index.d.ts`. Now it copies into `dist/types/index.d.ts`

OKTA-375765
<<<Jenkins Check-In of Tested SHA: 8b66da956f7860891bef5e2b6c3a8b2441d01491 for eng_productivity_ci_bot_okta@okta.com>>>
Artifact: okta-react-native

* chore: Updates changelog for 1.9.3 (#99)

Co-authored-by: Nikita <nikita.avraimov@okta.com>
Co-authored-by: NikitaAvraimov-okta <76003913+NikitaAvraimov-okta@users.noreply.github.com>
Co-authored-by: Aaron Granick <aaron.granick@okta.com>
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

6 participants