Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

stuck in redirect loop #81

Open
ashtonian opened this issue Nov 5, 2020 · 2 comments
Open

stuck in redirect loop #81

ashtonian opened this issue Nov 5, 2020 · 2 comments

Comments

@ashtonian
Copy link

Hi - love the plugin. I'm stuck in a redirect loop and I'm not sure why? I wonder if its because the lambda is attached to the http->https redirect behavior? not sure what it should be otherwise.

here is the config json:

{
    "AUTH_REQUEST": {
        "client_id": "id",
        "redirect_uri": "https://mydomain/oauth2/callback",
        "scope": "read:org user:email"
    },
    "TOKEN_REQUEST": {
        "client_id": "id",
        "client_secret": "secret",
        "redirect_uri": "https://mydomain/oauth2/callback"
    },
    "DISTRIBUTION": "distro",
    "AUTHN": "GITHUB",
    "PRIVATE_KEY": "",
    "PUBLIC_KEY": "",
    "SESSION_DURATION": 3600,
    "CALLBACK_PATH": "/oauth2/callback",
    "ORGANIZATION": "myorg",
    "AUTHORIZATION_ENDPOINT": "https://github.com/login/oauth/authorize",
    "TOKEN_ENDPOINT": "https://github.com/login/oauth/access_token"
}

CF Origin:

image

CF http -> https Behavior:
image

@ashtonian
Copy link
Author

haven't had any luck, used https://github.com/scalefactory/terraform-cloudfront-auth to see if I was doing something wrong and I'm still not sure whats up. Wondering if its a conflict around index.html. But either way I get a redirect loop.

@ashtonian
Copy link
Author

I think I figured it out, after trial and error with the terraform module. It seems the lambda doesn't like nested paths for the callback path. If my callback url is set to /blah it works but if its set to /blah/blah it fails in a loop.

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

1 participant