Go 1.11 has reached end of support
and will be deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Go 1.11
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Go
1.11 applications will continue to run and receive traffic after their
deprecation date. We
recommend that you migrate to the latest supported version of Go.
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-08-04 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 represents an application user and includes fields like Email, AuthDomain, ID, ClientID, FederatedIdentity and FederatedProvider."],["Functions `Current` and `CurrentOAuth` allow retrieval of the currently logged-in user, with `CurrentOAuth` specifically for users associated with OAuth consumers."],["The latest version of this package is 1.6.8, however previous versions are also available such as 1.6.7."]]],[]]