@using System.Security.Claims; @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @{ Layout = null; } Google.Apis.Auth.AspNetCore3 sample - Index

Google.Apis.Auth.AspNetCore3 sample - Index

The following links showcase some of the features provided by Google.Apis.Auth.AspNetCore3


@if (User.Identity.IsAuthenticated) {

Logout - You are currently logged in as @User.FindFirst(ClaimTypes.GivenName)?.Value.

} else {

Login - You are not currently logged in.

}

List current scopes - List all scopes this application is currently authorized for.

List Google Drive files - Use the Google Drive API to list some of the files that the logged user owns.

List Calendars - Use the Calendar API to list some of the calendars that the logged user has access to.

Show OAuth tokens related information

Force access token refresh