saml2aws icon indicating copy to clipboard operation
saml2aws copied to clipboard

Add logout

Open artkrz opened this issue 5 years ago • 7 comments

Once login is successful and the role is chosen it can't be switched until credentials expire or are removed from the credentials file.

$ saml2aws login --skip-prompt
credentials are not expired skipping

It would be useful to have the ability to issue logout or switch-role commands.

artkrz avatar Jun 07 '19 11:06 artkrz

I use --force with great success. That said, it would be very nice not to have to enter credentials again with an unexpired session.

apicht avatar Jun 07 '19 18:06 apicht

This is a great suggestion.

wolfeidau avatar Jun 10 '19 01:06 wolfeidau

+1

hazeem-salim avatar Sep 07 '19 13:09 hazeem-salim

you could do saml2aws login --force to achieve the same goal

zacyang avatar Oct 27 '19 23:10 zacyang

For role-switching, login --force is a sufficient workaround. However, sometimes I really do want to log out, not switch. For example, when I'm testing code that talks to AWS, sometimes I want to test that it emits the correct error message when it can't authenticate.

zbentley avatar Aug 30 '21 15:08 zbentley

Thanks you guys!!! The --force works just fine

jsantos93 avatar Jul 21 '23 18:07 jsantos93

For role-switching, login --force is a sufficient workaround. However, sometimes I really do want to log out, not switch. For example, when I'm testing code that talks to AWS, sometimes I want to test that it emits the correct error message when it can't authenticate.

saml2aws by default stores the credentials in standard awscli location, usually ~/.aws/credentials. You can delete that file to "log out".

andris-cakuls avatar Mar 07 '24 20:03 andris-cakuls