Automattic / Automattic/wp-api-console

Improve usage under configs with no auth

Open
#47 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
73
Forks
23
PR merge metrics
No merged PRs in 30d

Description

If we don't specify authentication settings in a configuration here is what happens after clicking the Sign In button:

### WP.com

![image](https://cloud.githubusercontent.com/assets/227022/20374343/99850618-ac3d-11e6-9e0a-9dba2b77bc0b.png)

### WP core (without OAuth1 plugin installed)

![image](https://cloud.githubusercontent.com/assets/227022/20374320/702b1ca8-ac3d-11e6-90ec-ec950b955469.png)

### WP core (with OAuth1 plugin installed)

![image](https://cloud.githubusercontent.com/assets/227022/20374415/1728efa8-ac3e-11e6-9360-e03f5baaf076.png)

### Next steps

- Maybe add a new auth provider `auth/none.js` and use it if the required parameters are not present - it doesn't make sense to have requests go through `oauth1.js` or `oauth2.js` if we know there is no auth.
- Detect this condition and make some UI changes accordingly (disable the Sign In button; maybe show an "unauthed" indicator instead).
- Add a note to the readme about this.
- Improve error handling for authentication requests in general.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.