diff --git a/Gotrue/Client.cs b/Gotrue/Client.cs index e10e685..5c51281 100644 --- a/Gotrue/Client.cs +++ b/Gotrue/Client.cs @@ -539,6 +539,23 @@ public async Task GetUserById(string jwt, string userId) throw ExceptionHandler.Parse(ex); } } + + /// + /// Get User details by JWT. Can be used to validate a JWT. + /// + /// A valid JWT. Must be a JWT that originates from a user. + /// + public async Task GetUser(string jwt) + { + try + { + return await api.GetUser(jwt); + } + catch (RequestException ex) + { + throw ExceptionHandler.Parse(ex); + } + } /// /// Create a user (as a service_role)