Function egg_mode::authenticate_url [] [src]

pub fn authenticate_url(request_token: &KeyPair) -> String

With the given request KeyPair, return a URL to redirect a user to so they can accept or reject an authorization request.

Access Token Authentication

Authentication overview

  1. Request Token: Authenticate your application
  2. Authorize/ Authenticate: Authenticate the user
  3. Access Token: Combine the authentication

Authenticate: Authenticate the user (with Sign In To Twitter)

This function is part of the step of authenticating a user with Twitter so they can authorize your application to access their account. This function generates a URL with the given request token that you must give to the user.

The URL returned by this function acts the same as the Authorize URL, with one exception: If you have "Sign In With Twitter" enabled for your app, the user does not need to re-accept the app's connection if they've accepted it previously. If they're already logged in to Twitter, and have already accepted your app's access, they won't even see the redirect through Twitter. Twitter will immediately redirect the user to the callback URL given to the request token.

If the user is redirected to a callback URL, Twitter will add two query string parameters: oauth_token, which contains the key from the request token used here, and oauth_verifier, which contains a verifier string that can be used to create the final access token.