这是我从 C# WPF 应用程序打开 Auth0 登录屏幕时的显示方式:Auth0 登录窗口
上半部分看不到。没有滚动条,无法调整窗口大小。只有全屏选项允许用户查看整个登录表单。
这是我用来打开它的代码:
try
{
var auth0 = new Auth0Client(
Properties.Settings.Default.auth0Domain,
Properties.Settings.Default.auth0ClientID);
var handle = new WindowInteropHelper(this).Handle;
var windowWrapper = new WindowWrapper(handle);
var user = await auth0.LoginAsync(owner: windowWrapper,
withRefreshToken: true, device: "DeviceName");
}
catch (Exception e)
{
Utilities.AppendLog("User login exception: " + e.Message);
}
我想调整窗口大小,以便用户可以看到整个登录表单。我需要做什么?
误会了。
整个登录屏幕由Auth0Client
. 您传入的窗口句柄只是弹出登录窗口的父窗口。
这是源代码Auth0Client
:
看看他们的登录屏幕……它是一个 Windows 窗体“表单”,看起来是固定大小的。在那个“区域”内,他们使用一个WebBrowser
控件……然后使用一个 Auth0“域” url 来进行实际登录。
这是我使用他们的示例应用程序进行登录时的样子 - 它的布局对您来说看起来不同。
您是否更改了 Auth0 帐户中的设置以以不同方式显示登录选项(即使用标签?) - 我对 Auth0 不够熟悉,不知道该选项在哪里。也许这是您正在使用的“扩展”之一?
It's possible that their "web page" design for a login using icon+name style list...doesn't get laid out properly when there are a number of "connection" types....and limited "height" in the "browser".
What you could do is either:
BrowserAuthenticationForm
so it has a bigger vertical size, so there is plenty of room to fit the list of login types intoor
Also make sure you are using the latest version of Auth0....though I'd think you probably are already...and it probably won't make a difference to the presentation.
Lastly, here's what it looks like if you just use a browser (e.g. Chrome), and size it so that the "client" area height is about 565 pixels...which is the same as the WebBrowser control height in BrowserAuthenticationForm
- notice the "title" being clipped (note I only have 4 log in provider options...compared to 5 in yours).
And if you make the browser a bit taller...then you can see it all.
Unfortunately, the way they've designed that popup HTML form doesn't work in limited height situations, and what's more "scrolling" has no effect if part of the "login screen" is being clipped.
(the WebBrowser
already has "scrollbars" enabled...so that's not stopping any scrolling).
您提到您的团队中的一个修改了登录屏幕,我相信这是在 Auth0 管理站点的“托管页面”部分中定义的……也许您可以稍微调整一下。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句