Skip to content

Instantly share code, notes, and snippets.

@elegantcoder
Created August 14, 2022 15:30
Show Gist options
  • Save elegantcoder/f2612cb500a9d1808c4d8adabdb387c7 to your computer and use it in GitHub Desktop.
Save elegantcoder/f2612cb500a9d1808c4d8adabdb387c7 to your computer and use it in GitHub Desktop.
OAuth2Response.type.ts
// Following RFC6749 5.1 Successful Response
export interface OAuth2SuccessfulResponse {
access_token: string;
token_type: string;
expires_in?: number;
refresh_token?: string;
scope?: string;
}
// Following RFC6749 5.2 Error Response
export interface OAuth2ErrorResponse {
error:
| "invalid_request"
| "invalid_client"
| "invalid_grant"
| "unauthorized_client"
| "unsupported_grant_type"
| "invalid_scope";
error_description?: string;
error_uri?: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment