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

GitHub Driver types missing GitHub App token fields? #156

Open
timneedham opened this issue Nov 29, 2024 · 1 comment
Open

GitHub Driver types missing GitHub App token fields? #156

timneedham opened this issue Nov 29, 2024 · 1 comment

Comments

@timneedham
Copy link

timneedham commented Nov 29, 2024

Package version

@adonisjs/[email protected]

Describe the bug

Hi,

Using a GitHub App as authentication (as opposed to just a GitHub OAuth app) provides refresh tokens and similar:

const githubProvider = ally.use('github')
const githubUser = await githubProvider.user()
console.log(githubUser.token)

Giving:

{
    token: 'ghu_xxxxxxxx',
    type: 'bearer',
    expiresIn: 28800,
    expiresAt: 2024-11-30T01:08:20.882Z,
    refreshToken: 'ghr_xxxxxxxx',
    refresh_token_expires_in: 15638400,
    scope: ''
  }

...which is at odds to what the current GithubToken type describes:

export type GithubToken = {
  token: string
  type: string
  scope: string
}

...not sure if it needs a tweak?

Reproduction repo

No response

@irshadahmad21
Copy link

Similar issue with LinkedIn token which also contains:

{
    "refresh_token_expires_in": 123,
    "id_token": "abc",
    "scope": "email,openid,profile"
}

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

2 participants