Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose helper functions for customer portal authentication #60

Open
brettflorio opened this issue Jul 2, 2024 · 0 comments
Open

Expose helper functions for customer portal authentication #60

brettflorio opened this issue Jul 2, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@brettflorio
Copy link
Contributor

When using the JWT from the Foxy customer portal's authentication, a method to compare "now" against when the JWT expires (date_created + expires_in) is likely the first thing you'll need to do. We've done this ourselves in the content-protection script for Webflow, and in a number of other situations.

It's not a complicated function to write, but it's still something we should have a helper for. Per @pheekus, this may just be a matter of exposing what we're already doing in a way that's easily usable by a developer adding the portal to their site: https://github.com/Foxy/foxy-sdk/blob/main/src/customer/API.ts#L121-L136

@brettflorio brettflorio added the enhancement New feature or request label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants