openid_client
openid_client copied to clipboard
Possibility to customize the message "You can close this window"
Hello, we are using a library to authenticate to Identity Server. Just to customize the window we need a message "You can close this window", in its place we put a loader in cs.
I have a Fork of the project with this change.
In this fork, the RedirectHtmlType was created, which defines what will be presented in the redirect's HTML.
enum RedirectHtmlType { htmlDefault, loading, custom }
By default is htmlDefault
And the loading
type, which
And there's custom
, so that everyone can customize it the way they want.
I made a PR so I can get into the version.
There may be a possibility of approval for us in this evolution?
Could anyone approve this PR?
Hello, we are using a library to authenticate to Identity Server. Just to customize the window we need a message "You can close this window", in its place we put a loader in cs.
I have a Fork of the project with this change. In this fork, the RedirectHtmlType was created, which defines what will be presented in the redirect's HTML.
enum RedirectHtmlType { htmlDefault, loading, custom }
By default ishtmlDefault
And theloading
type, whichAnd there's
custom
, so that everyone can customize it the way they want. I made a PR so I can get into the version. There may be a possibility of approval for us in this evolution?
Hello, how did you get it to run the webvie inside this bottomSheet?
Hello @rafaelmaia8384, to use WebView, I get the return from urlLancher and run the WebView in a showModalBottomSheet ex:
Future _openWebViewLoginAsync(
String url, context, Function(AuthModel) onLogin) async {
try {
var uri = Uri.tryParse(url.trimLeft())!;
if (!await canLaunchUrl(uri)) {
return false;
}
showModal(
context: context,
isScrollControlled: true,
height: 0.90,
child: Expanded(
child: WebView(
initialUrl: 'about:blank',
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (WebViewController webViewController) {
webViewController.loadUrl(url.trimLeft());
},
),
),
).whenComplete(() async {
var auth = await _getAuthModelAsync(null);
if (auth == AuthModel.empty()) {
await _deleteStorageAsync();
await _deleteCacheAsync();
}
onLogin(auth);
});
} on Exception catch (_, e) {
Groveman.error(_.toString(), error: e);
}
}
@rafaelmaia8384 We are creating a new package based on openid_client. We saw that they haven't updated the package for a long time and and has plenty of community fixes and improvements to go through. In this case we are creating the oauth_client open to the community, to apply these improvements and customizations that we are making.
Sorry for the silence. This is now fixed. I will release a new version soon.