Skip to content

Commit

Permalink
refactor: polish code (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun authored Feb 4, 2024
1 parent 0aed2cc commit fcbe5ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions samples/sample-blazor/Components/Pages/Home.razor
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

if (User?.Identity?.IsAuthenticated ?? false)
{
await LoadTokens();
await FetchTokenAsync();
}
}

Expand All @@ -84,7 +84,7 @@
NavigationManager.NavigateTo("/SignOut", forceLoad: true);
}

private async Task LoadTokens()
private async Task FetchTokenAsync()
{
var httpContext = HttpContextAccessor.HttpContext;
if (httpContext == null)
Expand Down
4 changes: 2 additions & 2 deletions samples/sample-blazor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
options.Endpoint = builder.Configuration["Logto:Endpoint"]!;
options.AppId = builder.Configuration["Logto:AppId"]!;
options.AppSecret = builder.Configuration["Logto:AppSecret"];
options.Scopes = new string[] {
options.Scopes = [
LogtoParameters.Scopes.Email,
LogtoParameters.Scopes.Phone,
LogtoParameters.Scopes.CustomData,
LogtoParameters.Scopes.Identities
};
];
options.Resource = builder.Configuration["Logto:Resource"];
options.GetClaimsFromUserInfoEndpoint = true;
});
Expand Down

0 comments on commit fcbe5ff

Please sign in to comment.