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

oauthd ignores refresh_token #109

Open
createproblem opened this issue Jul 25, 2014 · 2 comments
Open

oauthd ignores refresh_token #109

createproblem opened this issue Jul 25, 2014 · 2 comments

Comments

@createproblem
Copy link

Hello I want to use oauthd with a custom provider. My provider is really straight forward.

Here is the relevant part

"oauth2": {
    "authorize": "/auth",
    "access_token": "/token",
    "request": {
        "url": "http://localhost:8000/api",
        "cors": true,
        "query": {
            "access_token": "{{token}}"
        }
    },
    "refresh": "/token",
    "parameters": {
        "client_secret": "string",
        "client_id": "string",
        "scope": {
        }
    }
}

The Response type of my provider is Client-side (token)
The auth process and the client implementation works greate. But after 30 mins the access_token is invalid and I've to login again.
I used also my provider in the admin interface of oauthd and a I saw the following result is.

{
  "access_token": "NWRhZDUwODlhOTZmNTcxOTI3MzA1NzJjMjg2MDEyNGRmNTZiYzNlOWM3ZTRhZDM2Y2IzOWVkMGE3MTZhOWFjMQ",
  "token_type": "bearer",
  "expires_in": 3600
}

But my original response is

{
  "access_token": "NWRhZDUwODlhOTZmNTcxOTI3MzA1NzJjMjg2MDEyNGRmNTZiYzNlOWM3ZTRhZDM2Y2IzOWVkMGE3MTZhOWFjMQ",
  "token_type": "bearer",
  "expires_in": 3600,
  "refresh_token": "xxxx"
}

Why ignores oauthd my refresh_token? What is the trick to use the refresh token? My OAuthServer is setup correctly I use it with more client apps.

At the documentation I didn't found anything about refresh_token. Does oauthd really support or can handle refresh_tokens?

Thanks for help

@Gerst20051
Copy link

👍

@mattbucci
Copy link

Just a heads up, I ended up having to hack oauth2's coffeescript file on our version of oauthd. Setting the expires in to always be 3600 to get it to refresh because it was 500'ing when trying to grab the expires in part of the response from the provider during a refresh.

I suggest you run oauthd in development mode and check for errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants