tavikukko / Chrome-SP-Editor

Extension for creating and updating files (js, css) in SharePoint Online from Developer Tools
122 stars 39 forks source link

Can You please add link to sign out (useful for on-prems) #73

Closed Gennady-G closed 4 years ago

Gennady-G commented 4 years ago

Greetings @tavikukko !

By the way, if You have time - can You please add "Sign out" link to quick links?

links-2020-04-22_155845

Url is: /_layouts/closeConnection.aspx?loginasanotheruser=true

It is useful when need to change user working with on-prem sharepoint

Not an issue, but enhancement

Best regards, Gennady

tavikukko commented 4 years ago

Hi @Gennady-G ! Just tested this in online and it gives error:

Sorry, something went wrong An unexpected error has occurred.

But it actually signs you out...

Gennady-G commented 4 years ago

Hmm...

Yes, it finally gives error in Online.. Also tried with/_layouts/**15**/closeConnection.aspx?loginasanotheruser=true

Just googled it. We can avoid error adding Source to url. Maybe something like this would be Ok?

_layouts/closeConnection.aspx?loginasanotheruser=true&source=/_layouts/15/viewlsts.aspx

This does not give error for me..

Best regards, Gennady

tavikukko commented 4 years ago

Tried this and it logs you out and instantly start new sign-in process:

https://tenant.sharepoint.com/sites/sitecollection/_layouts/closeConnection.aspx?loginasanotheruser=true&source=https://tenant.sharepoint.com/sites/sitecollection

Can you verify in your online and on-prem envs and I will add it, if work in both?

Thanks

Gennady-G commented 4 years ago

Hi @tavikukko !

Yes, it works for me in both environments. But note that protocol could be http, and it fails if "https" is used in second occurrence:

http://server/_layouts/closeConnection.aspx?loginasanotheruser=true&source=http://server

this is for my on-prem.

Best regards, Gennady

tavikukko commented 4 years ago

nice!

yeah, all urls will be dynamic related to the current environment, not hardcoding anything.

So, I will have a look on this.

Thanks.

Gennady-G commented 4 years ago

Thank You much Tomi!)

tavikukko commented 4 years ago

Shipped in the latest version 5.5.7. Thanks @Gennady-G for the idea.