You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your IdentityServer host can check for clients with this property, and render links to those applications for the
17
+
currently authenticated user. Doing so gives the user a client application portal that lets them start using each
18
+
application, where navigating to an application link starts an OpenID Connect challenge with the application.
19
+
20
+
This creates a curious pattern, where the user follows a link from the portal page in the IdentityServer host to
21
+
an external application only to have that application immediately redirect back to the IdentityServer host's
22
+
`/connect/authorize` endpoint. However, if the user has logged in and created a session at the IdentityServer host,
23
+
they will get a single sign on experience as they navigate to the various applications in the portal.
24
+
12
25
:::tip
13
-
**Added in Duende IdentityServer 6.3**
26
+
The [Entity Framework Core project template](/identityserver/overview/packaging/#templates) comes with an example
27
+
`~/Portal.cshtml` Razor Page that implements this functionality.
14
28
:::
15
29
16
-
You can create a client application portal within your IdentityServer host that contains links to client applications that are configured with an `InitiateLoginUri`. `InitiateLoginUri` is an optional URI that can be used to [initiate login](https://openid.net/specs/openid-connect-core-1_0.html#thirdpartyinitiatedlogin). Your IdentityServer host can check for clients with this property and render links to those applications.
30
+
## Third-Party Initiated Login
31
+
32
+
The [OpenID Connect Core 1.0 specification](https://openid.net/specs/openid-connect-core-1_0.html#ThirdPartyInitiatedLogin)
33
+
describes several query string parameters that can be passed from the identity provider to the client application:
34
+
35
+
*`iss` - a URL (using the https scheme) that identifies the issuer
36
+
*`login_hint` - a hint about the end user to be authenticated
37
+
*`target_link_uri` - URL that the client application is requested to redirect to after authentication
38
+
39
+
These query string parameters are not included in the template IdentityServer client application portal, but you can add
40
+
them to your implementation when desired.
41
+
42
+
## Implement Identity-Provider Initiated Sign-In
43
+
44
+
To support identity-provider initiated sign-in, client applications must:
45
+
46
+
1. Be registered in IdentityServer with the `InitiateLoginUri` property set to a URL in the client application.
47
+
2. Implement an endpoint at that URL which triggers an OpenID Connect authentication challenge.
48
+
49
+
### Configuring The Client In IdentityServer
50
+
51
+
In your IdentityServer client configuration, set the `InitiateLoginUri` property:
52
+
53
+
```csharp {7}
54
+
// IdentityServer Configuration
55
+
// ...
56
+
newClient
57
+
{
58
+
ClientId="myclient",
59
+
// ... existing config ...
60
+
InitiateLoginUri="https://example.com/signin-idp"
61
+
}
62
+
```
63
+
64
+
### Implementing The Endpoint In The Client Application
65
+
66
+
In your ASP.NET Core client application, implement the endpoint referenced by `InitiateLoginUri`.
67
+
This endpoint should trigger the OpenID Connect authentication challenge.
68
+
69
+
Here's an example ASP.NET Core endpoint that redirects the user to IdentityServer for authorization.
70
+
When the user is already authenticated, the user is redirected to the application root.
Those links are just links to pages within your client applications that will start an OIDC challenge when the user follows them. This creates a curious pattern, where the user follows a link from the portal page in the IdentityServer host to an external application only to have that application immediately redirect back to the IdentityServer host's `/connect/authorize` endpoint. However, if the user has logged in and created a session at the IdentityServer host, they will get a single sign on experience as they navigate to the various applications in the portal.
88
+
For the challenge to work, an OpenID Connect schema must be configured in your client application.
89
+
When multiple OpenID Connect schemas are registered, you can also use the `Results.Challenge()` overload that allows
90
+
you to target a specific scheme.
19
91
20
-
The quickstart UI contains an example of such a portal in the `~/portal` razor page.
0 commit comments