mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-19 05:55:34 +09:00
fix(sso): trust absent email_verified claim and relax auth code length limit (#1493)
This commit is contained in:
1 parent
09a825ce5b
commit
b323701774
2 files changed
+3
-3
No files matched your search
@@ -224,7 +224,7 @@ function resolveEmailVerified({
|
|||||||
if (values.includes(false)) {
|
if (values.includes(false)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return values.includes(true);
|
return values.length === 0 || values.includes(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isJsonWebKeySet(value: unknown): value is JSONWebKeySet {
|
function isJsonWebKeySet(value: unknown): value is JSONWebKeySet {
|
||||||
|
|||||||
@@ -260,8 +260,8 @@ export const SsoStartRequest = z.object({
|
|||||||
export type SsoStartRequest = z.infer<typeof SsoStartRequest>;
|
export type SsoStartRequest = z.infer<typeof SsoStartRequest>;
|
||||||
|
|
||||||
export const SsoCompleteRequest = z.object({
|
export const SsoCompleteRequest = z.object({
|
||||||
code: createStringType().describe('Authorization code from the SSO provider'),
|
code: createStringType(1, 4096).describe('Authorization code from the SSO provider'),
|
||||||
state: createStringType().describe('State parameter for CSRF protection'),
|
state: createStringType(1, 4096).describe('State parameter for CSRF protection'),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type SsoCompleteRequest = z.infer<typeof SsoCompleteRequest>;
|
export type SsoCompleteRequest = z.infer<typeof SsoCompleteRequest>;
|
||||||
|
|||||||
Reference in new issue
Block a user