Search code examples
githubgithub-api

GitHub App web application flow: What is the login parameter for when requesting the user identity?


I am building a GitHub app that requires user-to-server access tokens. I am following the Web application flow so a user can sign in and my app gets the access token.

My question is about the login parameter in the href when requesting the user's identity:

When your GitHub App specifies a login parameter, it prompts users with a specific account they can use for signing in and authorizing your app.

  • What does specific account mean? Does it mean the currently logged in GitHub's user account?

  • What is the point of this parameter?

  • What is the difference between supplying the parameter and not
    supplying the parameter?

Thanks!


Solution

  • The login is a suggested github user. When I supplied a valid login, the authorization screen showed the suggestion on top when I was logged in with a different user account.

    enter image description here

    So a use case would be if you saved the user name already somewhere and want to remind the user to use that account.