Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock v11.12.0 throws an error on login #1556

Closed
okorolko opened this issue Nov 23, 2018 · 1 comment · Fixed by #1557
Closed

Lock v11.12.0 throws an error on login #1556

okorolko opened this issue Nov 23, 2018 · 1 comment · Fixed by #1557

Comments

@okorolko
Copy link

After upgrading from 11.11 to 11.12 I started to get the following error on login

index.js:46 Uncaught TypeError: t.get is not a function
    at Object.o [as id] (index.js:46)
    at c (confirmation_pane.jsx:8)
    at p._constructComponentWithoutOwner (ReactCompositeComponent.js:306)
    at p._constructComponent (ReactCompositeComponent.js:282)
    at p.mountComponent (ReactCompositeComponent.js:185)
    at Object.mountComponent (ReactReconciler.js:43)
    at performInitialMount (ReactCompositeComponent.js:368)
    at p.mountComponent (ReactCompositeComponent.js:255)
    at Object.mountComponent (ReactReconciler.js:43)
    at performInitialMount (ReactCompositeComponent.js:368)```

export function id(m) {
  return m.get('id'); <-- fails here
}

Used the following params

<head>
    <script src="https://cdn.auth0.com/js/lock/11.12.0/lock.min.js"></script>
</head>
<body>
    <script>
        const lock = new Auth0Lock(
        'CLIENT_ID',
        'AUTH0_DOMAIN',
        {
            "auth": {
                "redirect":false,
                "audience":"AUDIENCE"
            },
            "rememberLastLogin":false,
            "allowSignUp":false
        });

        lock.show()
</script>
</body>

adding this piece of code fixed it

window.lock = lock;
window.lock.get = () => ''
luisrudge added a commit that referenced this issue Nov 23, 2018
fix #1556

### Changes

Passing the lock instance as props so the confirmation pane (only shown when redirect:false) doesn't throw an error.

### References

#1556
@luisrudge
Copy link
Contributor

Fix released in 11.12.1

jfromaniello pushed a commit to jfromaniello/auth0-lock that referenced this issue Jun 26, 2020
fix auth0#1556

Passing the lock instance as props so the confirmation pane (only shown when redirect:false) doesn't throw an error.

auth0#1556
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants