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

failed to delete client token #317

Closed
andypeng2015 opened this issue Dec 13, 2020 · 2 comments
Closed

failed to delete client token #317

andypeng2015 opened this issue Dec 13, 2020 · 2 comments

Comments

@andypeng2015
Copy link

in v0.3.1 I am able to remove token in cookie, but in v0.4.2 it fails and user still see the token in browser even after it's deleted, see the code diff below, pls advise how to achieve the same in v0.4.2 @crewjam thanks

samlSP := samlsp.New(samlsp.Options{
		Logger:            logger.Logger,
		AllowIDPInitiated: true,
		IDPMetadataURL:    cfg.SAMLIDPMetadataURL,
		URL:               cfg.SAMLSPURL,
		Key:               cfg.SAMLCert.PrivateKey.(*rsa.PrivateKey),
		Certificate:       cfg.SAMLCert.Leaf,
		CookieMaxAge:      cfg.SAMLCookieAge,
		CookieName:        cookieName,
		CookieSecure:      true,
	})

// v0.3.1 works fine
samlSP.ClientToken.SetToken(ctx.Response().Writer, ctx.Request(), "", 0*time.Second)

// v0.4.2 failed to remove token in cookie
samlSP.Session.DeleteSession(ctx.Response(), ctx.Request())
@crewjam
Copy link
Owner

crewjam commented Dec 14, 2020

Hi @andypeng2015 I believe this was resolved by #321. Please reopen if not.

@crewjam crewjam closed this as completed Dec 14, 2020
@sausax
Copy link

sausax commented Feb 12, 2021

The token cookie still not getting deleted with DeleteSession() call.

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

3 participants