mirror of
				https://github.com/steveiliop56/tinyauth.git
				synced 2025-11-04 08:05:42 +00:00 
			
		
		
		
	feat: map info from OIDC claims to headers
This commit is contained in:
		@@ -10,7 +10,7 @@ import { useAppContext } from "../context/app-context";
 | 
			
		||||
import { Trans, useTranslation } from "react-i18next";
 | 
			
		||||
 | 
			
		||||
export const LogoutPage = () => {
 | 
			
		||||
  const { isLoggedIn, username, oauth, provider } = useUserContext();
 | 
			
		||||
  const { isLoggedIn, oauth, provider, email } = useUserContext();
 | 
			
		||||
  const { genericName } = useAppContext();
 | 
			
		||||
  const { t } = useTranslation();
 | 
			
		||||
 | 
			
		||||
@@ -56,7 +56,7 @@ export const LogoutPage = () => {
 | 
			
		||||
              values={{
 | 
			
		||||
                provider:
 | 
			
		||||
                  provider === "generic" ? genericName : capitalize(provider),
 | 
			
		||||
                username: username,
 | 
			
		||||
                username: email,
 | 
			
		||||
              }}
 | 
			
		||||
            />
 | 
			
		||||
          ) : (
 | 
			
		||||
@@ -65,7 +65,7 @@ export const LogoutPage = () => {
 | 
			
		||||
              t={t}
 | 
			
		||||
              components={{ Code: <Code /> }}
 | 
			
		||||
              values={{
 | 
			
		||||
                username: username,
 | 
			
		||||
                username: email,
 | 
			
		||||
              }}
 | 
			
		||||
            />
 | 
			
		||||
          )}
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,8 @@ 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(),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user