Closed peterphanouvong closed 1 week ago
[!WARNING]
Review failed
The pull request is closed.
The recent changes across the files primarily focus on enhancing flexibility and clarity in the authentication logic. The updates include making certain parameters optional, improving error messaging, and refining the construction of redirectURL
properties to handle various configurations more accurately.
File Path | Change Summary |
---|---|
src/handlers/auth.js |
Made the options parameter optional and updated an error message for a missing environment variable. |
src/routerClients/AppRouterClient.js |
Updated the redirectURL logic to construct it based on the presence of options?.config?.siteUrl . |
src/routerClients/PagesRouterClient.js |
Modified the redirectURL property to correctly generate URLs based on options?.config?.siteUrl . |
sequenceDiagram
participant Client as Client Application
participant ARC as AppRouterClient
participant PRC as PagesRouterClient
rect rgb(200, 200, 255)
note over ARC, PRC: New Redirect URL Logic
Client ->> ARC: Initialize with options
alt options?.config?.siteUrl exists
ARC ->> ARC: Set redirectURL to `${options?.config?.siteUrl}/api/auth/kinde_callback`
else
ARC ->> ARC: Set redirectURL to config.clientOptions.redirectURL
end
Client ->> PRC: Initialize with options
alt options?.config?.siteUrl exists
PRC ->> PRC: Set redirectURL to `${options?.config?.siteUrl}/api/auth/kinde_callback`
else
PRC ->> PRC: Set redirectURL to config.clientOptions.redirectURL
end
end
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Explain your changes
Checklist
🛟 If you need help, consider asking for advice over in the Kinde community.