-
Notifications
You must be signed in to change notification settings - Fork 5
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
mu-plugin in playground to disable REST API auth #30
Conversation
7a7a13a
to
b02dd8e
Compare
b02dd8e
to
a31c80e
Compare
This is a great solution! However, it doesn't seem to be working, I haven't looked into why that is. I added a temporary button to create a post (we can delete it before merging this). After clicking the button, in the extension console, you can see that the response is 401: |
I haven't tested it in this repo (meaning from the frontend in this repo), but a simple curl command to the REST API and it worked. 401 without it, and successful post creation with it. I will do some digging. |
@psrpinto You can try now & once you remove the test button, mark this as approved, so that I can merge :) don't mind the failing test, its from test code, which will be gone. |
I removed the button and took the liberty of improving a couple of things. |
@psrpinto Excellent! I see |
@psrpinto confirmed its intentionally kept there for reference, so merging now. |
This PR effectively solves our "how to auth" with REST API problem since we do this in playground specific to our browser extension and not in general with the backend plugin.
I ended up trying this "disabling auth" approach because with using password approach, that works with application passwords and not just regular user's password. And even with application passwords, there wasn't an easy way to communicate that to frontend once we create and set that up. Options exist for development purposes but not so much for prod, when folks are using this extension out in the wild.
I think this playground specific effect is quite a good option. Thoughts?