authenticationError: Unauthorized on Subdomain
VTFLAB opened this issue · 2 comments
The problem is simple, is this a bug?
if I set up a callback for this domain, you will be able to authenticate successfully.
https://example.com:3000/auth/twitter/callback
But if you set it this way, the authentication will not pass.
https://sub.example.com/auth/twitter/callback
Error
AuthenticationError: Unauthorized
Doesn't Passport support authentication with subdomains?
Callback settings are already configured correctly in TwitterDevelop
I would like to know if anyone is successfully using passport-twitter from a subdomain in the first place.
"Unauthorized on Subdomain" is not an error that originates from Passport. This suggests it is related to your application or its configuration. Can you provide more details on the framework your app is using and how it is configured? Stack traces would help pinpoint the issue.
I understood the problem, though I haven't solved it.
My frontend is something like example.com, but the backend is api.example.com
This was happening because the credentials were only in the example.com cookie and api.example.com could not get the credentials.
This will be a different issue, so I'll close it, thanks for the tip