OAuthConsumerKey returns the OAuth consumer key provided with the current
request. This method will return an error if the OAuth request was invalid.
User
typeUserstruct{EmailstringAuthDomainstringAdminbool// ID is the unique permanent ID of the user.// It is populated if the Email is associated// with a Google account, or empty otherwise.IDstring// ClientID is the ID of the pre-registered client so its identity can be verified.// See https://developers.google.com/console/help/#generatingoauth2 for more information.ClientIDstringFederatedIdentitystringFederatedProviderstring}
CurrentOAuth returns the user associated with the OAuth consumer making this
request. If the OAuth consumer did not make a valid OAuth request, or the
scopes is non-empty and the current user does not have at least one of the
scopes, this method will return an error.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["The `user` package provides functionality for managing user authentication within App Engine applications."],["It includes functions to check if a user is an administrator (`IsAdmin`), generate login and logout URLs (`LoginURL`, `LoginURLFederated`, `LogoutURL`), and retrieve the OAuth consumer key (`OAuthConsumerKey`)."],["The package defines a `User` struct that holds information about the authenticated user, such as their email, authentication domain, ID, and more, including if they are an admin."],["The `Current` and `CurrentOAuth` functions allow retrieving information about the currently logged-in user, with the latter handling OAuth-based authentication and scope validation."],["Users can view the `user` package on pkg.go.dev to gain more information and see older versions."]]],[]]