MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
270 stars 243 forks source link

Twa support #328

Closed mario-madrid closed 2 years ago

mario-madrid commented 2 years ago

Hi!

First of all, congratulations for this amazing plugin. I'm using it in several apps and it works really well.

My question is if there is any chance to avoid the top navigation bar with the URL and some other things that, in some cases, breaks the style of the login Page.

I've been searching a bit and I think using TWA may be a good way to hide the bar.

I don't know if would be a valid idea in iOS so this issue is to request more info in case you have it.

Sorry for my english.

Regards!

MaikuB commented 2 years ago

I'm not familiar with TWAs but from what I read, it has no relevance to this as it's more of form of trusted PWA so an iOS app wouldn't be a PWA to begin with. As far as I know, what you're after isn't possible either. Note that this plugin uses other SDKs to perform login requests etc so you should look more into those repositories, how they work etc when it comes to what's possible

mario-madrid commented 2 years ago

Hi MaikuB. I've been researching through AppAuth SDK for android and mixing the content of this issue with this article and I think that with a little modifications of the plugin we can achieve the hide of url making a digital link for the case.

I have downloaded the repo and do some modifications and I get it working without the url bar. I have to do some more proof of concepts in iOS version.

I ask you if we can hold the issue opened because right now I have time to investigate (and I really want to).

At the moment, doing a digital assets link in my identity provider (identityserver4 in my case):

image

And modifying FlutterAppauthPlugin.java file (performAuthorization method) like this:

image

If you think is a good idea, I can make a branch and keep working in order to do a PR in next days or weeks (will be reporting as far as I go forward).

Thx in advance and sorry for my english.

NOTE: Is my first GitHub contribution so, if you need additional information or there is something I'm doing wrong, feel free to tell me.

mario-madrid commented 2 years ago

I close the issue, researching my use case I've found that ResourceOwnerPassword Flow fits more in my use case.

Thx.