question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Authentication not working

See original GitHub issue

I can successfully log in to the app section once but then Hello undefined and the username is blank (screenshot).

If I refresh it goes back to You are not logged in.

Tested in latest FF and Chrome using the one-click deploy button on Netlify. I didn’t change any defaults.

Thank you for your work on this demo! 👏 It is super helpful to understand. Appreciate any input to get it working again.

screen shot 2019-01-14 at 11 41 55 pm

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
sw-yxcommented, Jun 1, 2019

i’m long overdue to update this demo with everything i have done recently (check out react-netlify-identify). thanks for the prompting.

1reaction
mrispoli24commented, Jun 1, 2019

Hey all, had the same problem tonight working through the tutorial but was able to fix it by modifying the login page a bit. Looks like the auth isn’t being initialized properly so the widget does not fire. Also prettier doesn’t like the unused isLoggedIn function on that page. In any event I modified it to this and all is well if anyone is wondering. Not sure why it works on the live netlify demo though for this.

import React from 'react'
import { navigate } from 'gatsby'
import { handleLogin, initAuth } from './services/auth'

class Login extends React.Component {
  componentDidMount = () => {
    initAuth()
  }
  handleSubmit = () => handleLogin(user => navigate(`/app/profile`))
  render() {
    return (
      <>
        <h1>Log in</h1>
        <button onClick={this.handleSubmit}>log in</button>
      </>
    )
  }
}

export default Login
Read more comments on GitHub >

github_iconTop Results From Across the Web

Common problems with two-step verification for a work or ...
If you're using two-step verification with your work or school account, it most likely means that your organization has decided you must use...
Read more >
Problem Solving Login Issues with Two-Factor Authentication
This page provides a list of common problems with two-factor authentication login and what you can do to solve them. ~ New! ~...
Read more >
Fix common issues with 2-Step Verification - Google Support
My Google Authenticator codes don't work. It may be because the time isn't correctly synced on your Google Authenticator app. To set the...
Read more >
How to Fix Google Authenticator Codes That Have Stopped ...
Launch the app, tap the menu button (the three dots at the top right of the screen), and go to Settings > Time...
Read more >
Google two factor authenticator (2FA) code not working
The most common cause of 2-factor authentication problems is that the time on your Google Authenticator app is not synced correctly.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found