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

put_session successful, but get_session failed #182

Open
Jaycelv opened this issue Apr 19, 2023 · 1 comment
Open

put_session successful, but get_session failed #182

Jaycelv opened this issue Apr 19, 2023 · 1 comment

Comments

@Jaycelv
Copy link

Jaycelv commented Apr 19, 2023

Steps to Reproduce

export ACCOUNT_AUTH0_DOMAIN="dev-quu8v1pqs4oq7.us.auth0.com"
export ACCOUNT_AUTH0_CLIENT_ID="YGsykmGsfj0qALk8NraBnjb"
export ACCOUNT_AUTH0_CLIENT_SECRET="7fygpnimCdxhun9Ng7wOabfyCCyz6se3NYBGoXGutbVOw6hFnGOQ"
export ACCOUNT_AUTH0_LOGOUT_URL="https://dev-quu8v1pqs4oq7.us.auth0.com/v2/logout"
export ACCOUNT_AUTH0_LOGOUT_RETURN_URL="https://compony.com/auth/logout"
export ACCOUNT_CLOAK_KEY="lvutbtvZAeuy3SFAftwky+IW4ESy6syE="
here is my env config, When I log in, I can be redirected to the authorization login page and successfully authorize. I print logs in the code and the parameters passed to put_session have values, but the method get_session(conn, :current_user) cannot retrieve the value.
The following is the user log that I printed out."
%{avatar: "https://lh3.googleusercontent.com/a/AGNmyxYRdPlRmw7aj-Ekprx5cCpIfoqgyg_BKPb0svLN=s96-c", email: "aaa@gmail.com", id: 10, name: "Rumble", nickname: "Rumble.L", uid: "google-oauth2|114928592633458978", watchlist_id: 10}

Expected Result

get_session can get personal information

Actual Result

get_session return nil

@Hajto
Copy link
Contributor

Hajto commented Nov 24, 2023

Can you got more information? What is the exact scenario? Would you mind sharing information about the router? get_sesion eludes to Phoenix. Session information must be first fetched. It is usually done through a plug in the pipeline. Maybe you have default phoenix pipelines and you piped through wrong one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants