2017-04-27 1 views
10

私はopeiddictを認可サーバーとは別のWebアプリケーションとして構築しました。私はちょっとした問題に悩まされています。それは、クライアントWebアプリケーションからのリンクを介して直接ユーザー登録ページに行く方法です。今、私はあなたのサンプルの一例として、ログインページに行くことができます:openiddict認証サーバーのサインアップページへのアクセス方法?

public ActionResult SignIn() { 
      // Instruct the OIDC client middleware to redirect the user agent to the identity provider. 
      // Note: the authenticationType parameter must match the value configured in Startup.cs 
      return new ChallengeResult(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties { 
       RedirectUri = "/" 
      }); 
     } 

は、クライアントアプリから認証サーバのアカウント/登録に行く方法はありますか?

+0

をサイード、Zafrul、あなたが回答/答えの方法で、より多くの何が必要な場合は私に知らせてください。 –

答えて

3

リダイレクトでURLを設定できるようです。次のコードを参照してください:

[AllowAnonymous] 
public IActionResult SignIn() 
{ 
    return new ChallengeResult(
     OpenIdConnectDefaults.AuthenticationScheme, 
     new AuthenticationProperties 
     { 
      IsPersistent = true, 
      RedirectUri = Url.Action("SignInCallback", "Account") 
     }); 
} 

こちらのドキュメントを参照してください:Initiating the authentication flow

関連する問題