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

I want to do mutation queries on wordpress wpgraphql. #797

Closed
siddhantdante opened this issue May 26, 2020 · 6 comments
Closed

I want to do mutation queries on wordpress wpgraphql. #797

siddhantdante opened this issue May 26, 2020 · 6 comments

Comments

@siddhantdante
Copy link

siddhantdante commented May 26, 2020

This is plugin does not generate an access token for WordPress authentication I mean how do I create a post using this auth0 login by a decoupled front-end. How do i get current user scope in my react app using bearer token like jwt authentication plugin does or wp-graphql-jwt-authentication plugin does.

https://my-wordpress-domain/graphql
request this url with bearer token in wordpress so that i can run wordpress operations.

Help
Thank you

@joshcanhelp
Copy link
Contributor

@siddhantdante

This is plugin does not generate an access token for WordPress authentication

The plugin does not generate access tokens, correct.

I mean how do I create a post using this auth0 login by a decoupled front-end.

That would be outside of the scope of this plugin. This plugin just replaces the login process. Once the user is logged into WordPress via Auth0, the plugin's job is done.

If there's anything we can do to make our plugin play nicely with another plugin providing that functionality, we're happy to take a look. Unfortunately, I'm not familiar with how either of those work.

@siddhantdante
Copy link
Author

@joshcanhelp

I am currently working on this is plugin https://github.com/wp-graphql/wp-graphql-jwt-authentication to validate the auth0 API token so that when I request a graphql request on my server by passing an authorization header with auth0 API access token. And trying to decode it at the server-side and trying to authentication users each time I do graphql request.

please help me if I am heading in the wrong direction.

@joshcanhelp
Copy link
Contributor

the auth0 API token

Where is that coming from? How is it being requested?

passing an authorization header with auth0 API access token

Do you have access to the validation rules? The access tokens Auth0 (the server, not the WordPress plugin) generates should be validated as a standard JWT:

https://auth0.com/docs/tokens/guides/validate-access-tokens#custom-api-access-tokens

And trying to decode it at the server-side and trying to authentication users each time I do graphql request.

Decoding that in your WordPress application? So your Application and your API as defined in Auth0 are basically the same entity?

@siddhantdante
Copy link
Author

Where is that coming from? How is it being requested?

I have created an API in auth0 dashboard

https://auth0.com/docs/tokens/guides/validate-access-tokens#custom-api-access-tokens

thanks

Decoding that in your WordPress application? So your Application and your API as defined in Auth0 are basically the same entity?

working on it.

if you have any better opinion that how I can authenticate with WordPress using auth0 login and can do operations directly on WordPress using graphql API.

@stale
Copy link

stale bot commented Aug 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️

@stale stale bot added the closed:stale label Aug 26, 2020
@stale stale bot closed this as completed Sep 2, 2020
@vashisth00
Copy link

This is still a recurring issue right now

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants