Issues with new SPA Library

I have been having a lot of issues and could really use some guidance.

I started my attempt to get Auth0 working after giving up on Cognito User Pools.

I tried using the Vue Sample that uses the old auth0.js library, I got pretty far. I even got the Cognito Identity Pool working. I still need it for my API Calls to API Gateway, My S3 Calls and my calls to SQS.

With the original Vue sample every time you refreshed your page Auth0 would reauthenticate and load the callback page. After finding a discussion on this and that a good answer might be to try the new api, I started working on that.

The problem is that after many hours of frustartion (There is no Vue sample yet for the new library that I could find). I finally got it working, I thought. Then I went to a page logged in and hit refresh, and guess what? Re hit the callback page just like before. The exact same problem I had before I started this journey.

I started search again and found a reference to something saying that localhost will always require the callback to get hit on page refresh and you should set an entry in your hosts file and use that. So I tried that, and then I get:

auth0-spa-js.production.js?8304:1 Uncaught (in promise) TypeError: Cannot read property ‘digest’ of undefined

After looking into that it says that non localhost must be secure. This is a dev environment, so now what?

In addition to that I was trying to get the Federated Log in to AWS to work and it requires the expiresat be passed in with the token, How do I get that with new API?

Also, how do you get your Facebook access token using the new api if you have used Facebook to sign in?

Hi @subssn21,

Welcome to the Auth0 Community Forum!

It sounds like you are running into a few separate issues here, let’s start with this one:

I think the solution for this problem is to remember the current route in session and pass it as the redirect url. Take a look at this doc.

Let me know if that helps,
Dan

Hi, @subssn21, check this. javascript - How to use SubtleCrypto in chrome (window.crypto.subtle is undefined) - Stack Overflow . run this on the chrome console window.Crypto.subtle

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.