Is it possible to create an embedded login mask? #109
-
I've been reading a lot lately trying to figure out how could I implement a custom login page with a pkce authorisation code flow. Wherever I read I keep seeing that the authorisation code flow is supposed to work only with redirect. Also ROPC and implicit flow are completely forbidden for modern SPAs. Therefore I ask myself, how are most of the apps that I visit able to display a login page as part of the main domain? For example facebook.com on icognito shows a login page on the main domain. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
That's a good question and probably a lot to unpack (and I also do not know of every good practice in this regard), so I try to keep myself as short as possible. IIRC, in the case of Facebook, its frontend is written in PHP. So, the server is able to just render what it wants the user to see as the front page.
And actually, there is a route Since I think this is one of the main issues and the reason why Facebook can do this so easily and us (Flutter devs) cannot. |
Beta Was this translation helpful? Give feedback.
-
Oh wow, that was a quick answer! "the server is able to just render what it wants" I think this is the answer for the facebook case. Didn't think it this way. Which also leads me to realise that I could do something similar in the future. Though I'm also aware that many apps in my laptop work with a regular login screen + many on the phone. I'm puzzled how they manage to do it seamlessly. Hope we get more answers on this thread
|
Beta Was this translation helpful? Give feedback.
That's a good question and probably a lot to unpack (and I also do not know of every good practice in this regard), so I try to keep myself as short as possible.
IIRC, in the case of Facebook, its frontend is written in PHP. So, the server is able to just render what it wants the user to see as the front page.
Internally, this could just boil down to something as simple as
And actually, there is a route
facebook.com/login/
which will just show you the login page, which suggests that both have a similar codeflow.Since
flutter_web_auth_2
is a Flutter package, it is a bit difficult to achieve the same in a secure way here: …