Options
All
  • Public
  • Public/Protected
  • All
Menu

Handles logging in and creates the user object, which is passed up to parent components. Acts as an Adapter for the react-google-login GoogleLogin component.

Hierarchy

Index

Constructors

constructor

Methods

failedGoogleLogin

  • failedGoogleLogin(): void

render

  • render(): any

successfulGoogleLogin

  • successfulGoogleLogin(response: GoogleLoginResponse | GoogleLoginResponseOffline): void
  • Handles a successful Google Login. Creates the user through a backend call if it is the first time they've logged in, otherwise it just gets an access token. Uses the login callback from props to update application state.

    Parameters

    • response: GoogleLoginResponse | GoogleLoginResponseOffline

      Contains an authorization code which can be used to get an access token and refresh token. The parameter will never be of type GoogleLoginResponse because we are only requesting Offline access, but it is required to define it like this because the API from the GoogleLogin button specifies it this way.

    Returns void

Generated using TypeDoc