Proper login architecture with Firebase then (Instagram) in Flutter - flutter

Let me explain what I'm trying to do. I have an app that users Firebase to authenticate users. When a user logs in, though, the user has to link an Instagram account in order to proceed (the app does things with Instagram data). The question is not about how to do the actual login with either Firebase or Instagram, the question is about how to structure my app so the workflow works. My current workflow relies on a root page listening on a stream for changes in the Firebase user and returns the corresponding page depending on the situation. This is not really what I want for two reasons. 1) It's broken; the pages don't actually return when they're supposed to (this might be because I have a FutureBuilder inside a StreamBuilder so it's getting confused?). If I reload the app, however, the state did change and it loads the correct page. 2) Doing this I have to go directly from the create account page to the linking page. I want to go back to the login page in order to confirm accounts by sending an email before proceeding with the Instagram linking process. In summary, here's some pseudocode for what I'm trying to do:
Root Page:
If user is logged in:
Go to Link Decider
Else:
Go to (Firebase) Login Page
Link Decider:
If user is logged in with Instagram:
Go to Home Page
If user has Instagram account linked to Firebase but is not logged in:
Go to Log in with Instagram Page
If user hasn't linked Instagram:
Go to Link Instagram Page
Instagram Link/Login Pages:
Do login then go to Home Page
Sorry for the long question I've just been trying a lot of things and nothing seems to work so I figured someone else might have a better idea of how to do this. If you want to see some concrete implementation I can add it but I don't think it's necessary (since I'm trying to do this a better way not fix my wacky one). Any help is very much appreciated. Thank you!

If you want my opinion, follow the Flutter Firebase & DDD Course series in the below link. I have learned a lot from this website with regards to architecting your application
Flutter Firebase & DDD Course

Related

before and after login view

since I'm super new to Flutter, what is it called when you have some access to the application before login, but after login you have access to whole app.
if you don't get what I'm saying, I try to explain in some examples.
When I download an app from AppStore, Google Play.
I can take a look at some part like main UI and other stuff in main page.
but for section, pages and etc..., I need to login to see them.
it shows some property before login and others after login.
what is it called and what is the best recommendation to work with in Flutter?
Many thanks for your time
I think you mean authorization, check this for example Get Started with Flutter Authentication

Flutter - How to build an app with a generic homepage and optional sign in features

I am trying to create an e-commerce app which has a generic homepage, which will list all products. I would then like the user to have an "account" page where they can either sign up or sign in.
When the user attempts to buy a product from the home screen, if they are not logged in they will need to before proceeding. I am not expecting someone to code this out for me (unless its a fairly straightforward ask) but can somebody advise on how to structure this project or better yet, link me to an example? I have trawled youtube looking for an example but all seem to have the user directed straight to the log in screen when launching the app.
Thanks
You have to learn Firebase methods it will give you a server less cloud to stock your data and handle users information for account page.
I learn thanks to these guy videos https://youtu.be/FTju8w4zEno

Making a flutter app that gives push-notification whenever new notice is posted on university homepage

I am creating a Flutter app that gives push-notification whenever a new notice is posted on my university's website. The university's web page needs login(the web page allows information only to university members). Currently, I have almost finished the front-end part(with dart language) for the app, and to move on, I thought I needed to enable login function first, in order to access the website information. So, I have been googling with keywords something like 'Flutter app login to web'. However, I could only find the answers for 'how to make [web app] with Flutter'. I wanted to implement login with the current front-end state because I have almost completed the front-end rather than making a 'web app' from the beginning. I don't know if searched wrong, but I could not find how to make login on the app, and how to give a push-notification whenever a new announcement is posted on the university's web page. Could anyone tell me the big picture of how I should move on to finish my app project? Would it be better if I begin my project with a 'web app' from the beginning, or is there a way to implement login to the web from my current front-end and implement a push-notification?
I am thinking to make an app that the user logs in to the app with the user's webpage account(once the user logs in after installation then the app logins automatically whenever the app is executed) and the user could register specific keyword to receive push-notification(when the new announcement posted on the website contains that keyword). With this function, the user would not need to type id, password to login to the website from a browser every time just to check if the specific notice(that the user wanted) is posted. So basically this app simply eliminates the process of logging in to the website and checking manually for specific posts.
To conclude, I want to know two things.
How to implement login to the website from the app (and automatic authentication)
How to implement push-notification for the post that contains the keyword user has registered.
Sorry for my awkward English and long question. I wrote my best to make my question understandable. I would be so much thankful if anyone could tell me how should I implement to finish my app project.

Facebook page tab prompting for login, but it shouldn't

When a user is not logged in and they navigate to a page tab made with our app, they get an obtrusive dialog asking them to log in:
This has nothing to do with http vs https, the app is not in sandbox mode, there is nothing in the tab asking for a login or user information, etc. I've gone through the app settings at least a half dozen times now, and nothing is wrong there. Aside of urls, the settings are identical to another app I have that does not suffer from this problem. I'm stumped!
Edit: here is an affected tab: https://www.facebook.com/StaticHtmlThunderpenny/app_203351739677351
This message is not about login to your app, but Facebook in general.
So my guess would be that the page your app is installed as page tab app on is restricted in some way – by age, location, or for having alcohol-related content. And then of course Facebook asks for login, because otherwise they can not determine whether or not the (as of now still “anonymous”) user qualifies to see the page.
So go check the page settings.
This is actually not app related question.
This is thumb rule!! To access any app on Facebook, you need to log in to Facebook. You can see Facebook page without log in. But for facebook apps, you should be authentic user.
with this issue in my own experience that I came across some years back with a facebook app that I was running, if this doesn't relate to any of your other social networking apps then am aligning two set of possibilities and solution.
The user might have not properly logged out as "written" in the app for the users logout stage.
Solution would be that the user logout as expected before closing the app.
The user might have set up an automatic login prompt which was removed by the app when it was been updated automatically. (If you do get me???)
Solution would be to monitise your app on updates and login informations or better still just login and logout ask intended by the app and for security reasons.
Lastly I would say that automatic bookmark database should be added to the server part so current pages as the user uses the app would be saved after logout or login stage. Thank you, hope this helps and if not let me know what am missing.

Get Realtime Updates from a Facebook page

I am working on a web app that use Facebook login. The purpose of the app is to get information about fan pages that the user has in his account (for which he got admin privileges). I work mostly with the insights informations but this is not the issue. Now I would like to receive realtime update from the page like new messages, page posts reply etc. I've read the documentation https://developers.facebook.com/docs/reference/api/page/#realtime
and I don't understand the part about adding the app to the page. It is required that the app to be installed for example in one of the tabs? If so, is there a way not to do that and still receive the informations that I want? Also when I try to create a Realtime Update Subscriptions for the page object no "posts" field was available, then how to get realtime updates about it? I am a little confuse and any guidance and advise is more than welcomed.
P.S. I am using PHP SDK, if this helps with something.
I've read the documentation
How about reading it again?
I don't understand the part about adding the app to the page. It is required that the app to be installed for example in one of the tabs? If so, is there a way not to do that and still receive the informations that I want?
Quote from the docs part you linked to yourself:
Note: You might think that because you're adding this via the tabs API that this is a tab app. It's not. This app isn't visible to users as a page app and isn't managed via any UI.
Also when I try to create a Realtime Update Subscriptions for the page object no "posts" field was available, then how to get realtime updates about it?
You can subscribe to the page’s feed.