|
|
|
|
|
by OhHeyItsE
3150 days ago
|
|
It's a good idea, but if your product is a website, cookies and authentication in general are going to be a real challenge. Obviously you won't be able to share cookies between the site and the api. But you have the additional challenge of having your api domain treated as 3rd party and are thus subject to all the security measures and sandboxing that come with that. And what if your product is just an api for use by developers? Now the api is part of your brand. It's just a bad situation all around. |
|
I don't know of any API that requires cookies from the site. Usually you use an access token or something similar for an API.
> But you have the additional challenge of having your api domain treated as 3rd party and are thus subject to all the security measures and sandboxing that come with that.
CORS solves most of the pain points. You just need to ensure the API is serving the correct CORS headers.