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

Setting expired cookies. #45

Open
ksXV opened this issue Jan 31, 2023 · 2 comments
Open

Setting expired cookies. #45

ksXV opened this issue Jan 31, 2023 · 2 comments

Comments

@ksXV
Copy link

ksXV commented Jan 31, 2023

I haven't modified goth_fiber.SessionStore yet when I hit the callback the cookie that gets sent from the server is already expired.
I tried setting the session like this https://github.com/markbates/goth#security-notes but still to no result.
Does anybody have a clue why is this happening ?

@AlyxPractice
Copy link

Same here, the cookie expires instantly.

@AlyxPractice
Copy link

Fixed by passing the option gf.CompleteUserAuthOptions{ShouldLogout: false}:

app.Get("/auth/:provider/callback", func(ctx *fiber.Ctx) error {
user, err := gf.CompleteUserAuth(ctx, gf.CompleteUserAuthOptions{ShouldLogout: false})
if err != nil {
	return err
}
ctx.JSON(user)

return nil
})

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