Closed peterphanouvong closed 1 month ago
The recent changes include adjustments to the import statements, string formatting, and property assignments in various files. The middleware.ts
file was streamlined to import only withAuth
, and string values in the config
object now use single quotes. The audience
property in src/config/index.js
was modified to split based on space if a value exists, enhancing flexibility and handling. Additionally, the isTokenValid
function was updated to use the spread operator for audience validation, and the KindeAccessToken
type received a new exp
field.
File | Change Summary |
---|---|
playground/src/middleware.ts |
Imported only withAuth and switched string values in config to single quotes. |
src/config/index.js |
Modified audience property to split KINDE_AUDIENCE by space if it exists, otherwise empty. |
src/utils/pageRouter/isTokenValid.js |
Updated the isTokenValid function to use the spread operator for audience validation. |
types.d.ts |
Added exp field of type number to the KindeAccessToken type. |
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
isTokenValid
audience check which was breaking when audience was an array and middleware was being usedKindeAccessToken
to includeexp
Checklist
🛟 If you need help, consider asking for advice over in the Kinde community.