Skip to content

Cookie authentication not properly working #525

Closed
@joepio

Description

@joepio

In the current release, I get a 401 after opening my drive. The error from the server shows that it has not found an Agent, which should imply there is no cookie set. However, there is in fact a cookie sent.

I'm not sure why this isn't working, but I suspect that one of the functions in the cookie parse logic is throwing an error which is thrown away with .ok(), which makes it impossible to see what is going on. So even though I'm not sure what is causing the issue, a good first step would be to refactor get_auth_from_cookie and make sure it gets rid of the .ok calls.

The reason I think the parsing fails, is because in production, we have multiple cookies. Google analytics is probably responsible for setting the multiple cookies. Our implementation should deal with this.

Screenshot 2022-10-27 at 08 59 15

Using actix_web::cookie might be a good idea.

However, even if we update the back-end, we might still have an issue with atomic-data-browser. When it sets the cookies, it may remove others (e.g. google analaytics) <- That is false.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingserveratomic-server

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions