Err_unknown_url_scheme问题

时间:2019-02-04 20:53:00

标签: android single-sign-on ping

我正在使用此library向我的Android应用添加OAuth流。 当有人单击SSO page上的电话或电子邮件链接时,库将引发错误。 The error is ERR_UNKNOWN_URL_SCHEME.

我该如何处理?

下面是我的代码

instantiateOauthManager(getOauthBuilder(authorizationUrl));

    OAuthManager.OAuthCallback<Credential> authorizationCallback = future -> {
      try {
        Credential credential = future.getResult();
        this.credential = credential;
      } catch (IOException e) {
        Log.e(LOG_TAG, "Error getting oauth2 ping sso credential. " + e.getMessage());
      } catch (CancellationException e) {
        Log.e(LOG_TAG, "Single sign on action has been cancelled by the user. " + e.getMessage());
      }
    };

oauth.authorizeExplicitly(Constants.PING_SSO_OAUTH2_USERID, authorizationCallback, null);

我的manifest中有以下内容。

<activity android:name="org.sample.rp.activity.MainActivity"
                  android:screenOrientation="portrait">
       <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <data android:scheme="rpconnect" />
       </intent-filter>
</activity>

非常感谢!

0 个答案:

没有答案