Facebook Login for an Ionic app powered by Yii2 and Drupal - angularjs

May be I am overcomplicating things and overthinking of a solution but this is what I am trying to accomplish:
I have an app that uses Ionic Angular JS as the frontend with multiple restful services from the backend. I am using a combination of Drupal and Yii2. Both of the apps can support Facbook login / sign up as web apps as the modules are available. Ionic app by itself can use FBLogin by using NGCordova. However, I need to do the following:
Login to Ionic app using Facebook Login.
Using this login create an account in both my Yii2 and Drupal 7 apps. (I can sacrifice one or the other if I really need to. I have two backends because I need one to store the custom logic an another for the content management.).
User should be able to create new nodes in both of the apps. (Yii2 will have a higher priority).
Any guidance will be great. Eventually I may expand FB login capability to Google ID as well.

Related

Setup a hybrid structure of MVC and React App

I'm familiar with the .Net and React applications individually. What I want to do is to create a hybrid app of MVC and React for SaaS. Below are the details,
.NET MVC application for our website (can't create this in react as
it is a website and intended to use for google crawl, SEO, and all)
Once users log in using the MVC application LOGIN form, I want to redirect
them to ReactApp which is basically a portion after login
I already have a website built using MVC. Now want to load React application after successful login
Note: This needs to be run under the same domain. No redirection to sub-domain or so. Although, we can have an additional paths like /user
Questions:
Is it possible to traverse users between both applications?
Is it possible to manage the same session between the two?

Implement Azure AD with React web application

Are there any examples on how to implement Azure AD with React web application the example I see include .net core examples only. Mine is pure React web application. Any suggestions?
it is ok to bundle the tenantid and clientid/application inside the react web application? would that have any security implications
We implemented similar structure as follows:
There is a webappservice, which is created from standart web application template. It handles all the authentication parts. Once user is authenticated, the web application service, serves react files with proper parameters (e.g. logged in, user token etc)

Azure app registration do not show up after creation

I am trying to add a new application to my azure AD to use for my Xamarin forms mobile app, but when I select Native app and finish the creation it does not show up under App Registrations but it does show up under enterprise applications but with a subset of functionality it seems, for example I cannot add users to the application and I cannot add reply to URLS etc, What could cause this behaviour?
Make sure you set the new filter to All Apps instead of My Apps.
Then it will show all Applications in the tenant.

How do you turn off IdentityServer3's built in UI views (login and registration)?

I'm trying to implement IdentityServer3 into my architectural mix. I like the idea of registering Clients, Users, and Scopes. What I do not like is using IdentityServer3's built in login and registration forms.
I have 4 different apps that need to use my IdentityServer3 implementation (aka TokenServer). These 4 apps are AngularJs apps. I have various C# .Net WebAPI services supplying data to these 4 apps. Right now each of these 4 apps have their own authentication and registration process. I need to consolidate authentication piece using IdentityServer3.
Each of these 4 apps have different account registration/authentication needs. There's a mix bag of 3rd party authentication (Facebook, Google) as well as traditional forms authentication against an account the user has registered with.
So, I cannot have any of my AngularJs apps use the default Login/Registration forms that come with IdentityServer3. I've spent a lot of time now trying to find a way to turn off the default views and just wire each of my AngularJs apps to my TokenServer. I simply want to POST login credentials to the /token endpoint and return a token that can be used in subsequent calls to my WebAPI. I want to replace the authentication process I have for each app with IdentityServer3 without changing the existing login/registration UIs.
I cannot find a sample app or even documentation that shows how to do this. Is it even possible to 'turn off' every one of IdentityServer3's UI views and use my AngularJs client's login and registration forms?
Please point me in the right direction. Thanks for your time.
It seems you want to use the OAuth 2.0 resource owner flow - which means - your app posts credentials to the token endpoint and gets back an access token. That is totally possible - you will miss out on some features like federation and SSO. But these are the known constraints of this flow.
If you want to use a redirect based flow (which gives you SSO and e.g. Google logins etc) - you need to redirect. You can replace any of the IdentityServer views with your own. The documentation and samples have plenty of information how to do that.
https://identityserver.github.io/Documentation/docsv2/advanced/customizingViews.html
https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/CustomViewService

Authenticating with App Engine in a Sencha mobile app

I have a web app running on app engine that uses google accounts for authentication (OAuth).
Now I'm trying to develop a mobile app using Sencha Touch and I'm stuck with how do I authenticate users with app engine. Loading the login page in the app looks ugly and opening login page in the device's browser is not so bad but I have no idea how to (if at all possible) to retrieve the cookie and store it in the app (so that they don't have to sign in everytime)
Ideally, I want to display a simple sencha form that asks for credentials and then checks that their valid with google. I still have no idea how to handle two factor authentication though.
I'm tempted to write my own authentication procedures and store user credentials manually on the datastore but I feel this shouldn't be that hard..
Has anyone been able to do this? Would openID provide an easier approach for authentication?
Check out Google App Engine Boilerplate. Their authentication flow is implemented pretty nicely (together with a bunch of other stuffs, like testing :D).
This should give you a head start. I am currently using it together with Sencha Touch
https://github.com/coto/gae-boilerplate

Resources