-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Client Side Token #17
Comments
Hey Evan, are you sure you performed a "POST" request ? For example, with curl: curl -i -X POST "https://trefle.io/api/auth/claim?token=YOUR-TOKEN&origin=your-website.rocks"
HTTP/2 200
server: nginx/1.14.0 (Ubuntu)
date: Tue, 14 May 2019 12:07:52 GMT
content-type: application/json; charset=utf-8
{"token":"eyJhbGciOiJIUzI1NiIsItR5cCI6IkpXVCJ9.eyJpcCI6WzQ4LDQ2LDQ4LDQ2LDQ4LDQ2LDQ4XSwiaXNzdWVyX2lkIjoxLCJvcmlnaW4iOiJsYWdhLmNvIiwiYXVkIjoiSm9rZW4iLCJleHAiOjE1NTc4NDI3NjYsImlhdCI3MTU1NzgzNTU2NiwiaXNzIjoiSm9rZW4iLCJqdGkiOiIybWY4bWNjdjc2bWZwdmd2M2swMnR0bDEiLCJuYmYiOjE1NTc8MzU1NjZ9.TJYar9UhYm0TvMSIr_OPZdrXeOuQCiM7XYlmJ2S_9tM","expiration":1557842766}% |
Totally my bad, I assumed it was a GET request. I am able to receive a token now, thanks so much for the fast reply. |
@lambda2 Hi! I've been getting 500 Internal Server Error when trying to get my client side token through curl. I tried your exact same curl command as in your previous reply, but it still I get a 500. If I change the token I get an error about using an invalid token and if I remove the origin-param I get a 400 instead (but the body still says "Internal Server Error" :P ). I'm really confused to what the problem might be, my website is |
Hey @FelixEder, fixed now. Thanks for the feedback and sorry for the inconvenience 🙏 |
@lambda2 Awesome, thanks a lot! :D |
Describe the bug
Attempting to get a client side token returns a 404
To Reproduce
Navigate to https://trefle.io/api/auth/claim
Expected behavior
A client side token an expiry are returned in order to make client side requests to the api
The text was updated successfully, but these errors were encountered: