Skip to content
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

why can't login ? myself compile and run #7

Closed
pkptzx opened this issue Feb 5, 2022 · 14 comments · Fixed by #8
Closed

why can't login ? myself compile and run #7

pkptzx opened this issue Feb 5, 2022 · 14 comments · Fixed by #8
Labels
bug Something isn't working

Comments

@pkptzx
Copy link

pkptzx commented Feb 5, 2022

i download u code , compile release and run ,
signed up is ok.
click "signed in", but can't login, it always redirect to login page.

and , found err by signed up , use name : 123456

thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: SkyError(UnexpectedDataType)', src/handlers/signup.rs:88:41        
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace 
@pkptzx pkptzx changed the title why why can't login without in docker Feb 5, 2022
@pkptzx pkptzx changed the title why can't login without in docker why can't login ? myself compile and run Feb 5, 2022
@ohsayan
Copy link
Owner

ohsayan commented Feb 6, 2022

Hey, which version of Skytable are you using locally? Jotsy depends on the latest version (the one in the next branch, and also the one available with the latest docker image for Skytable).

@hohowt
Copy link

hohowt commented Feb 6, 2022

me,too. but I installed it through the commands in README

@ohsayan
Copy link
Owner

ohsayan commented Feb 6, 2022

Looks like this is the offending line:

con.switch(crate::TABLE_AUTH).await.unwrap();

So the switch is causing a panic. Let me investigate this

@ohsayan
Copy link
Owner

ohsayan commented Feb 6, 2022

@5waker Couldn't repro this locally. Which tag of jotsy are you running? Try running docker-compose images from the jotsy directory

sayan@sayan-workstation:~/jotsy$ docker-compose images
  Container      Repository      Tag       Image Id       Size  
----------------------------------------------------------------
jotsy_app_1     ohsayan/jotsy   latest   b7ce5a361dad   132.1 MB
jotsy_skydb_1   skytable/sdb    latest   588363ebf129   137.4 MB

@hohowt
Copy link

hohowt commented Feb 6, 2022

@ohsayan

Container      Repository      Tag       Image Id       Size  
----------------------------------------------------------------
jotsy_app_1     ohsayan/jotsy   latest   0efaed216bc2   133.1 MB
jotsy_skydb_1   skytable/sdb    latest   806c014286f6   137.5 MB```

@ohsayan
Copy link
Owner

ohsayan commented Feb 6, 2022

@5waker run this:

sudo docker pull ohsayan/jotsy && sudo docker-compose up -d

@ohsayan
Copy link
Owner

ohsayan commented Feb 6, 2022

This should update your image

@hohowt
Copy link

hohowt commented Feb 6, 2022

ok, let me try

@ohsayan
Copy link
Owner

ohsayan commented Feb 6, 2022

Hey, @pkptzx, it seems like I can reproduce this, even with the latest tag 1797097a9515. Working on a fix now

@ohsayan
Copy link
Owner

ohsayan commented Feb 6, 2022

This has been fixed in #8. If you still have issues, feel free to re-open the issue

@ohsayan ohsayan added the bug Something isn't working label Feb 6, 2022
@pkptzx
Copy link
Author

pkptzx commented Feb 6, 2022

Because cookie set "Secure", the login is always directed to the login page without https.

can u customer set ? when test/dev in locally

@ohsayan
Copy link
Owner

ohsayan commented Feb 6, 2022

@pkptzx If I understand you correctly, you want to be able to disable the setting of the Secure attribute for Set-Cookie? Why would you want to do that, however?

Quoting from MDN docs, using the Secure attribute only works with HTTPS, with the exception for localhost:

A cookie with the Secure attribute is only sent to the server with an encrypted request over the HTTPS protocol. It's never sent with unsecured HTTP (except on localhost), which means man-in-the-middle attackers can't access it easily. Insecure sites (with http: in the URL) can't set cookies with the Secure attribute. However, don't assume that Secure prevents all access to sensitive information in cookies. For example, someone with access to the client's hard disk (or JavaScript if the HttpOnly attribute isn't set) can read and modify the information.

@pkptzx
Copy link
Author

pkptzx commented Feb 6, 2022

It doesn't matter, I solve it myself. Since I am remote development is not local access.

👀                                   👀

@ohsayan
Copy link
Owner

ohsayan commented Feb 6, 2022

Great! If you have anything else to report, don't hesitate to create an issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants