coder13 / coder13/fantasy-cubing-2017

OAuth flow is going through HTTP along the way

Open
#8 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

From Chrome dev tools when logging in:

![image](https://cloud.githubusercontent.com/assets/277474/22078749/fdcf0eaa-dd6d-11e6-81a8-fdeec20e7e72.png)

1. The `/authorize` is the OAuth route on the WCA website. The `redirect_uri` parameter looks like this: `redirect_uri=http%3A%2F%2Ffantasy.cubing.net%2Flogin`. Note the http, *not* https.
2. The first `/login?` is a HTTP url on fantasy.cubing.net.
3. The second `/login?` is a HTTPS url on fantasy.cubing.net.

Fixing 1) should be some reconfiguration of HAPI's auth flow: https://github.com/coder13/fantasycubing/blob/a949667a6413d995eacf5c0fe6c2a611887197aa/server/auth/index.js#L12-L32. I don't know where the redirect uri is configured. However, fixing that won't be enough, you'll also need to configure the WCA website to allow redirects to the HTTPS url, right now I see over on https://www.worldcubeassociation.org/oauth/applications/13/edit that only `http://fantasy.cubing.net/login` is listed as a redirect uri, not `https://fantasy.cubing.net/login`.

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.