Skip to content

Instantly share code, notes, and snippets.

@ilake
Created March 7, 2018 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilake/8b8ed8839cd26c3e78262a6f47cbdf18 to your computer and use it in GitHub Desktop.
Save ilake/8b8ed8839cd26c3e78262a6f47cbdf18 to your computer and use it in GitHub Desktop.
let result = await fetch({
api: "http://localhost:3000/users/auth/google_oauth2_for_api/callback",
method: 'get',
params: {
code: response.params.code,
redirect_uri: redirectUrl
}
})
// The result is from rails side.
const { auth_token, auth_email } = result.data;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment