Login with Link
  • Login with Link (auth back-end only)
  • 🤝Use API only
    • About this option: API only
    • Lookup email
      • Start verification
    • Authenticate
  • 💻OIDC / OAuth (hosted login page)
    • About this option: Open ID Connect (OIDC)
    • OIDC / OAuth
Powered by GitBook
On this page
  • Request
  • Response
  • If six-digit code is correct
  • If the six-digit code is not correct:
  1. Use API only

Authenticate

"Authenticate" means "Let the user enter their 2FA code to Stripe, and tell me if they authenticated correctly"

Request

POST to the following URL

POST https://loginwithlink.com/api/authenticate

Include:

  • The `client_secret` you received in step 1 (lookup).

  • The `email` of the consumer.

  • The six-digit code they have entered.

Response

If six-digit code is correct

We'll return a user object along with `authenticationSuccessful: true`

// if user code is correct
{ authenticationSuccessful: true,
  user: {
    email: "m@rkmoriarty.com"
  }
}

If you've been pre-approved, and if the user has such information saved, the user object may be enhanced with additional information:

{ authenticationSuccessful: true,
  user: {
    email: "m@rkmoriarty.com",
    fullName: "Mark Moriarty",
    city: "San Francisco, California 94114",
  }
}

If the six-digit code is not correct:

We'll return `authenticationSuccessful: false` along with an an error message.

{ authenticationSuccessful: false,
  errorMessage: "m@rkmoriarty.com"
}
PreviousStart verificationNextAbout this option: Open ID Connect (OIDC)

Last updated 1 year ago

🤝