I am getting this error when trying to do the quickstart example for integrating my app.
auth0.html:15 Uncaught ReferenceError: login is not defined
at HTMLButtonElement.onclick
The web page is very simple - straight from the example:
SPA SDK Sample
<h2>SPA Authentication Sample</h2>
<p>Welcome to our page!</p>
<button id="btn-login" disabled="true" onclick="login()">Log in</button>
<button id="btn-logout" disabled="true" onclick="logout()">Log out</button>
I have npm running on port 3000. I have all the callbacks set like the http://localhost:3000.
Thoughts?
Jerry
Hi @admin55
Can you provide a link to this SPA SDK so I can have a look? There are a few so I just want to make sure I’m looking at the right one.
Thanks,
Colin
1 Like
Hi Colin,
I thought the SDK was included by the line
I have 01-login or http://localhost:3000 working… How do I transition that to https://myserer.com - where I do have https running with letsencrypt.
Thanks
Jerry
Hi, @jerry.geis apologies for the delay it seems the spam filter may have hidden some of your comments.
In any case, welcome to the Auth0 community, and thanks for reaching out!
I understand you have a working auth0-spa-js sample and would like to incorporate it into your application being served at ‘https://myserer.com’. All you would need to do is have your application running on a server make a call to your Auth0 domain to initiate the login flow. You’ll need to update the application settings in the Auth0 dashboard (or via the Management API) particularly the Application URI
section so you can allow interactions with the Auth0 server from your hosted website.
I understand these are rather generic guidelines, but moving from localhost to your hosted website is a broad topic and isn’t an Auth0 specific issue. If you have any specific issues with the Auth0 product I’ll be glad to assist further.
Best Regards,
Colin