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

show web origin in window title #99

Merged
merged 2 commits into from
May 9, 2024
Merged

Conversation

mildsunrise
Copy link
Contributor

@mildsunrise mildsunrise commented Apr 19, 2024

this inserts the origin of the page in the browser's window, so that instead of

SAML Login

it shows

SAML Login (https://company.okta.com)

or whatever.

I know it's a small detail, but I think it's important to show it since it allows you to verify you're not typing your SSO credentials (for the whole organization) into a page that isn't the SSO portal (or isn't HTTPS). Everything shown inside the window is within the page's control, but the origin is not.

I know it's a small detail, but I really like to see
where I'm inserting the SSO credentials
@dlenski
Copy link
Owner

dlenski commented May 2, 2024

I know it's a small detail, but I think it's important to show it since it allows you to verify you're not typing your SSO credentials (for the whole organization) into a page that isn't the SSO portal (or isn't HTTPS).

Won't the webview show an error if it redirects from HTTPS → insecure HTTP, though?

Related: react-native-webview/react-native-webview#3086 and https://stackoverflow.com/questions/6909351/how-can-i-display-an-address-bar-with-a-webview

@dlenski
Copy link
Owner

dlenski commented May 2, 2024

this inserts the origin of the page in the browser's window

Seems fine, but do you think that displaying a grayed-out address bar widget would be clearer? Or perhaps putting a locked/unlocked icon in somewhere?

        urip = urlparse(uri)
        origin = '%s %s' % ('🔒' if urip.scheme == 'https' else '🔓', urip.netloc)
        self.window.set_title("SAML Login (%s)" % origin)

@pboushy
Copy link

pboushy commented May 3, 2024

those icons are identical.
Would be better to have an icon that looks different from the lock. 🔴 ? or 🚫 ?

@mildsunrise
Copy link
Contributor Author

Seems fine, but do you think that displaying a grayed-out address bar widget would be clearer?

it would be, but I don't have bandwidth right now for that much bulkier change. I'd suggest putting it in the title for now, and later we can upgrade it to an address bar.

Or perhaps putting a locked/unlocked icon in somewhere?

Showing an emoji seems like a very good idea, since the "s" in the protocol is hard to miss. I'll implement that.

But I agree with @pboushy that those two emojis are nearly identical... I'll put 🔒 and 🔴

@dlenski dlenski merged commit c46af04 into dlenski:master May 9, 2024
6 checks passed
@mildsunrise mildsunrise deleted the show-origin branch May 10, 2024 16:32
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

Successfully merging this pull request may close these issues.

None yet

3 participants