-
Notifications
You must be signed in to change notification settings - Fork 72
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
Expiry setting #31
Comments
Hey!! Stoked to have you looking into WPGraphQL. The work you’ve been doing with WordPress and Gatsby is really cool! I’m afk but will get you details shortly. Short answer is: Refresh tokens are default as 1-year but can be revoked. Auth (access) tokens are 5 minutes by default, but cant be revoked. You can filter the expiration though. |
Thanks Jason, that's a really nice thing to say! I feel the same way about wp-graphql! Over the last few days I've been going over in my head how to swap out the "engine" of wordsby away from static json files towards wp-graphql instead. |
For general questions use Slack or Spectrum: https://spectrum.chat/wpgraphql If you actually think you found a bug or have a feature request, open an issue. For the sweet stuff you’re working on, like admin dashbords, etc, you should check out the Model Layer branch we have going on the main wp-graphql repo. We’re doing a lot of cleanup around permissions, capabilities, etc. I’d love to chat more with you about your projects. I’ve been working on a dashboard as well, so we could definitely collaborate on that. One of my goals of WPGraphQL is to recreate the WP-Admin using React and have all the data come from WPGraphQL. From what I’ve seen with your work with the Gatsby dashboards, you’ve got a very similar vision. For me, building something like that will help finesse the shape of the Schema. Figure out what can/cannot be done with the existing Schema, where we’re missing features, etc. Then I also want to recreate a full core theme (twentysixteen) or something to make sure WPGrapHQL is comprehensive enough for front-end devs too. I’m not far from that already with the Blog example I posted last week. Anyway, excited to chat more with you! |
Hey, here's the filter for the expiration date: https://github.com/wp-graphql/wp-graphql-jwt-authentication/blob/master/src/Auth.php#L114 |
And the filter for the refresh token expiration: https://github.com/wp-graphql/wp-graphql-jwt-authentication/blob/master/src/Auth.php#L316 |
I'd love to collaborate on an admin dashboard! That would be pretty awesome if the whole front and backend of WP was just react and graphql. That could really bring WP into the present/future. All those plans and the model layer sound really great. Also, thanks for pointing out where those filters are. In retrospect it would've been pretty to easy for me to just look through the source but I appreciate you pointing it out. |
How long do tokens last until they expire? I see for the rest api JWT plugin there's a filter to increase the time before expiry. Does this plugin have something similar?
Thanks!
The text was updated successfully, but these errors were encountered: