Skip to content

Commit

Permalink
fix: passwordless' SSL check was backwards (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
ForbesLindesay committed Jul 26, 2020
1 parent 42fb3af commit d10e14f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/passwordless/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ export default class PasswordlessAuthentication<State> {
const magicLink = new URL(baseURL.href);
if (
process.env.NODE_ENV !== 'development' &&
magicLink.protocol !== 'http:'
magicLink.protocol !== 'https:'
) {
throw new Error(
`Cannot use non-ssl callback URL in production. If you are running ` +
`Cannot use the non-ssl callback URL, "${magicLink.href}", in production. If you are running ` +
`locally, you can set the NODE_ENV environment variable to development. ` +
`If you are running in production you can set BASE_URL to the https ` +
`URL for your app.`,
Expand Down

0 comments on commit d10e14f

Please sign in to comment.