Skip to content

Releases: EasyAbp/Abp.PhoneNumberLogin

1.2.0

19 Nov 19:22
Compare
Choose a tag to compare

Breaking Changes

The new 1.2.0 version supports both OpenIddict and IDS4 for ABP 6.0.1. You can migrate your app with the following steps.

  1. Install the new EasyAbp.Abp.PhoneNumberLogin.Domain.OpenIddict or EasyAbp.Abp.PhoneNumberLogin.Domain.Ids4 module and remove the old EasyAbp.Abp.PhoneNumberLogin.Domain module.

  2. Specify a auth server in the appsettings.json file of the Web/Host project.

    {
      "AbpPhoneNumberLogin": {
        "AuthServer": {
          "Authority": "https://localhost:44395",
          "ClientId": "MyProjectName_App",
          "ClientSecret": "1q2w3e*"
        }
      }
    }
  3. Add the PhoneNumberLogin_credentials grant type in OpenIddictDataSeedContributor.

    grantTypes: new List<string>
    {
        OpenIddictConstants.GrantTypes.AuthorizationCode,
        OpenIddictConstants.GrantTypes.Password,
        OpenIddictConstants.GrantTypes.ClientCredentials,
        OpenIddictConstants.GrantTypes.RefreshToken,
        PhoneNumberLoginConsts.GrantType // add this grant type
    }
  4. Find these cocdes in OpenIddictDataSeedContributor

    if (grantType == OpenIddictConstants.GrantTypes.ClientCredentials)
    {
        application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.ClientCredentials);
    }

    and add these codes on the following line

    if (grantType == WeChatMiniProgramConsts.GrantType)
    {
        application.Permissions.Add($"gt:{WeChatMiniProgramConsts.GrantType}");
    }
  5. Run the DbMigrator project to create the client. Notice that you must manually add the grant type if your client already exists.

What's Changed

  • Upgrade to ABP 6.0.1 and support OpenIddict by @gdlcf88 in #5
  • Fix auth server configurations by @gdlcf88 in #6
  • Update the README documentation by @gdlcf88 in #7

New Contributors

Full Changelog: 1.1.2...1.2.0