mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 04:35:40 +00:00
* refactor: return all values from body in the providers * refactor: only accept claims following the OIDC spec * feat: map info from OIDC claims to headers * feat: add support for required oauth groups * fix: bot suggestions * feat: get claims from github and google * fix: close body correctly
14 lines
312 B
TypeScript
14 lines
312 B
TypeScript
import { z } from "zod";
|
|
|
|
export const userContextSchema = z.object({
|
|
isLoggedIn: z.boolean(),
|
|
username: z.string(),
|
|
name: z.string(),
|
|
email: z.string(),
|
|
oauth: z.boolean(),
|
|
provider: z.string(),
|
|
totpPending: z.boolean(),
|
|
});
|
|
|
|
export type UserContextSchemaType = z.infer<typeof userContextSchema>;
|