lynndylanhurley / devise_token_auth

Token based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth.
Do What The F*ck You Want To Public License
3.54k stars 1.13k forks source link

jToker / Devise Token Auth demo has a 500 internal error. #1164

Open lassiter opened 6 years ago

lassiter commented 6 years ago

I was testing out the demo registering and the post was getting a 500 error.

main.js:16 POST https://devise-token-auth-demo.herokuapp.com/auth 500 (Internal Server Error)
send @ main.js:16
ajax @ main.js:16
F.emailSignUp @ main.js:34
handleRegistrationClick @ main.js:3
h @ main.js:25
executeDispatch @ main.js:32
g @ main.js:25
i @ main.js:25
l @ main.js:25
c @ main.js:32
processEventQueue @ main.js:25
c @ main.js:30
handleTopLevel @ main.js:30
e @ main.js:30
perform @ main.js:32
batchedUpdates @ main.js:28
f @ main.js:31
dispatchEvent @ main.js:30

VM534:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Function.ea.parseJSON (main.js:16)
    at F.rejectPromise (main.js:34)
    at F.error (main.js:34)
    at k (main.js:13)
    at Object.fireWith [as rejectWith] (main.js:13)
    at c (main.js:16)
    at XMLHttpRequest.b (main.js:16)
lassiter commented 6 years ago

The main README should be updated if the demo has been abandoned or provide an email/password to test it.

RigoOnRails commented 6 years ago

The reason it's causing an error is because it's sending emails via Mailgun's sandbox subdomains, which are for testing only.

Here's the 500 page it returns:

Net::SMTPFatalError in DeviseTokenAuth::RegistrationsController#create
=======
554 Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in Account Settings.

You'll need to send emails via your own domain somehow.

lassiter commented 6 years ago

ah, got it.

It's weird that would occur when the member/user is being deleted, strange.

RigoOnRails commented 6 years ago

@lassiter I believe you're talking about your other issue #1205, this is about the 500 error in the jToker demo

lassiter commented 6 years ago

Oh, my bad. I’m seeing this from my phone. The internet isn’t good enough to visit web, just plain text emails.

RigoOnRails commented 6 years ago

@lassiter No worries 😄