menu
Channels
# All channels
view-forward
# General
view-forward
# Announcements
view-forward
# Feedback
view-forward
# Guides
view-forward
# I Made This
view-forward
Team

Error fake-auth base64

April 17, 2020 at 4:51pm

Error fake-auth base64

April 17, 2020 at 4:51pm
Hello, I downloaded a next.js with fake-auth divjoy package and I got this error on npm run dev
[ error ] ./node_modules/fake-auth/dist/index.mjs Can't import the named export 'Base64' from non EcmaScript module (only default export is available)

April 17, 2020 at 8:36pm
Thanks for letting me know about this! I just pushed an update to fix this. You just need to update fake-auth to version 0.1.2 (npm install [email protected]) and it should work.
Edited
like-fill
1
  • reply
  • like
Awesome, it works! Thank you!
  • reply
  • like
Awesome, it works! Thank you!
Glad to hear it! Let me know if you have any other issues.
  • reply
  • like
In Auth.js, fakeAuth looks like undefined (from import fakeAuth from "fake-auth";)
Edited
  • reply
  • like
Just tried to signup
  • reply
  • like
Sorry, fakeAuth is ok. Here is something else undefined
  • reply
  • like
f is not defined
  • reply
  • like
Okay looking into this now. Will report back soon.
like-fill
1
  • reply
  • like
Have you made sure that all values in your .env file are specified? Also if you could let me know what your complete stack is, such a database option, that would help me.
Edited
  • reply
  • like
Of course, my stack is UI: Bootstrap Framework: Next.js Authentication: Other Database: Other Hosting: ZEIT Now Newsletter: None Contact form: None Analytics: None
like-fill
1
  • reply
  • like
About .env, I didn't add anything inside
  • reply
  • like
I only have by default FORMSPREE_CONTACT_ID=XXXXX
  • reply
  • like
But I don't use it
like-fill
1
  • reply
  • like
Okay, I believe I've fixed the problem! In src/pages/api/_require-auth.js you just need to change fakeAuth.verifyAuthToken to fakeAuth.verifyAccessToken and update fake-auth one more time: npm install [email protected]. Thanks for bearing with me here.
I will be updating Divjoy momentarily so all new exports will be fixed.
  • reply
  • like
Signup works now, thank you :)
  • reply
  • like
I have a new error on settings page now :( Sorry about that
  • reply
  • like
No problem, happy to get all this fixed
  • reply
  • like
What's the error?
  • reply
  • like
  • reply
  • like
In your dev tools network tab are you able to see if it's making a request to /api/user-get.js and what the response for that API request is? Basically it should be hitting one of your API endpoints (located in src/pages/api/) which returns a placeholder user object.
  • reply
  • like
Here is only a call on POST user-create
  • reply
  • like
It returns {email: "[email protected]"}
  • reply
  • like
Okay will try to reproduce this issue
  • reply
  • like
Is it working with a fresh download from divjoy?
  • reply
  • like
This may be another bug related to fake-auth.. will let you know in a sec and hopefully have a fix for ya :)
  • reply
  • like
Show more messages