Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SSO Login Success Page needs a designer's touch #2454

Closed
kontsevoy opened this issue Dec 21, 2018 · 6 comments
Closed

SSO Login Success Page needs a designer's touch #2454

kontsevoy opened this issue Dec 21, 2018 · 6 comments
Assignees
Labels

Comments

@kontsevoy
Copy link
Contributor

kontsevoy commented Dec 21, 2018

Problems

When using SSO via an external provider, say Github, users execute:

$ tsh login --proxy=proxy.example.com --auth=github

... which opens a browser window with a Github login page.

Problem One

It uses the wrong browser. On my machine the default is Chrome (clicking on any URL in a terminal opens Chrome, I am on Ubuntu). But tsh opens Brave for some reason.

Problem Two

When a user successfully authenticates, Github redirects back to Teleport and it shows this ugly page:

ugly-post-login

  • Drop that smiley face
  • Do not mention tsh because the same page is re-used by Gravity. The language should be a simple "Login successfull, you can close this window".
  • We must not use any external resources for this page (like URLs to CSS/images)
  • (Ev's pet peeve) the URL of this page is also annoying. /msg/info?! Authentication URLs follow REST pattern in well-written applications around "session" resource, i.e. GET /session/new is the login screen and GET /session/status would be this.
@alexwolfe
Copy link
Contributor

How's this?

teleport - login success

The images can be base 64 urls and the css can be place in the <style> tag.

@knisbet
Copy link
Contributor

knisbet commented Dec 22, 2018

It uses the wrong browser. On my machine the default is Chrome (clicking on any URL in a terminal opens Chrome, I am on Ubuntu). But tsh opens Brave for some reason.

I think a customer reported an issue similar to this previously with tele, and had linked to a go library that they noted works correctly on their system with other programs. The 2 second search though I can't find the history or where this might have been captured in tickets, but let me know if you'd like my help tracking this down.

@kontsevoy
Copy link
Contributor Author

@klizhentas it's another example where Teleport/Gravity functionality is shared but the Teleport repo is used to create a ticket. tele also uses the wrong browser on my box. See if you want to create a mirroring ticket on Gravity side.

@alex-kovoy
Copy link
Contributor

For the first problem.

We use sensible-browser command to open a default browser on linux systems. Below is an order of lookups it does to launch a default browser:

if test -n "$DISPLAY"; then
    if test -n "$GNOME_DESKTOP_SESSION_ID"; then
        if test -x /usr/bin/gnome-www-browser; then
            exec /usr/bin/gnome-www-browser "$@"
        elif test -x /usr/bin/x-www-browser; then
            exec /usr/bin/x-www-browser "$@"
        elif test -x /usr/bin/gnome-terminal && test -x /usr/bin/www-browser; then
            exec /usr/bin/gnome-terminal -x /usr/bin/www-browser "$@"
        fi
    fi
    if test -x /usr/bin/x-www-browser; then
        exec /usr/bin/x-www-browser "$@"
    elif test -x /usr/bin/x-terminal-emulator && test -x /usr/bin/www-browser; then
        exec /usr/bin/x-terminal-emulator -x /usr/bin/www-browser "$@"
    fi
elif test -x /usr/bin/www-browser; then
    exec /usr/bin/www-browser "$@"
fi

@kontsevoy, could it be the user error with misconfigured default browser? Where (for example) the /usr/bin/gnome-www-browser would start the Brave browser?

@alex-kovoy
Copy link
Contributor

This is another discussion on the subject
https://askubuntu.com/questions/8252/how-to-launch-default-web-browser-from-the-terminal

As an alternative we can use xdg-open command (which some of the golang internal packages use too). And fallback to sensible-browser if does not exist.

@alex-kovoy
Copy link
Contributor

fixed by c6464a7 0b272d4

p.s. All URLs for UI routes will be revisited as part of 1M milestone.

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

No branches or pull requests

4 participants