Skip to content

Commit

Permalink
Merge pull request #21071 from abpframework/18588
Browse files Browse the repository at this point in the history
Update documentation for relevant external login enhancements
  • Loading branch information
EngincanV authored Oct 14, 2024
2 parents 2880b5f + 6d30c9a commit 816cd0a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
Binary file added docs/en/images/my-externa-logins.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/images/new-external-login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 18 additions & 4 deletions docs/en/modules/account-pro.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Follow the steps below to install a new external/social login. We will show Face
#### Add the NuGet Package

Add the [Microsoft.AspNetCore.Authentication.Facebook](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.Facebook) package to your project. Based on your architecture, this can be `.Web`, `.IdentityServer` (for tiered setup) or `.Host` project.
Add the [Microsoft.AspNetCore.Authentication.Facebook](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.Facebook) package to your project. Based on your architecture, this can be `.Web`, `.AuthServer` (for tiered setup) or `.Host` project.

#### Configure the Provider

Expand Down Expand Up @@ -194,12 +194,26 @@ context.Services.AddAuthentication()
context.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IPostConfigureAccountExternalProviderOptions<OpenIdConnectOptions>, OpenIdConnectPostConfigureAccountExternalProviderOptions>());
````

#### For Tiered / Separate IdentityServer Solutions
#### For Tiered / Separate AuthServer Solutions

If your `.IdentityServer` is separated from the `.Host` project, then the `.Host` project should also be configured.
If your `.AuthServer` is separated from the `.Host` project, then the `.Host` project should also be configured.

* Add the [Microsoft.AspNetCore.Authentication.Facebook](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.Facebook) package to your `.Host` project.
* Add `WithDynamicOptions<FacebookOptions>()` configuration into the `ConfigureServices` method of your module (just copy the all code above and remove the `.AddFacebook(...)` part since it is only needed in the IdentityServer side).
* Add `WithDynamicOptions<FacebookOptions>()` configuration into the `ConfigureServices` method of your module (just copy the all code above and remove the `.AddFacebook(...)` part since it is only needed in the AuthServer side).

## Manage External Logins

You can link an external login in `Account/ExternalLogins` page of `Account` module.

![my-externa-logins](../images/my-externa-logins.png)

![new-external-login](../images/new-external-login.png)

### Social Account Security Setting

Users who register via both local registration and external/social login using the same email address will be required to enter their local password on the first external/social login.

![require-local-password-on-social-account-linking](../images/require-local-password-on-social-account-linking.png)

## Internals

Expand Down

0 comments on commit 816cd0a

Please sign in to comment.