Is there a way to achieve SSO in Xamarin forms app. I have done some basic research and have zeroed down on 2 approaches for Authenticating my enterprise apps.
1.) Use microsoft company portal intune. For this I would be creating a new sample app, registering it in Azure AD, configure InTunes in Azure, installing Microsoft Authenticator,use InTune nuget packages for Xamarin forms side of code.
For this do we have any steps on how to achieve the same or some head way, regarding app registration and configuration in InTune, configuration of new URI for app, code changes at App end, in order to invoke Authenticator, code snippets for Xamarin Forms and not for Native apps.
2.) Leverage Service Broker. I had found this link, which expands on the same, but could not get any ADAL DLL's to achieve the same.
So do we have any concrete or recommended approaches in achieving SSO with microsoft authenticators for Xamarin Forms Apps, would be glad to know more.
Thanks In Advance!!!..
Related
I am developing a .NET MAUI app for use on iOS, Android, and Windows devices.
In general, I have found that the documentation on Firebase to be lacking when integrating within any .NET application. In particular, given the quick rise of .NET Maui's popularity, I don't see any advice with regard to allowing my MAUI app to add Firebase authentication via Login with Google or Facebook. Maybe the documentation hasn't caught up yet?
Here is a screenshot the the project settings in my Firebase project.
Do I need to configure an Android app and then an iOS here for Google login?
If there is anyone who has accomplished this for .NET MAUI and could provide some guidance, I'd be all ears.
I am currently following a Xamarin tutorial here: https://www.youtube.com/watch?v=NYMCrD9klA0
I am developing a web app with boilerplate "dotnet core" version. I want to authenticate user with adfs. I've searched on Google and the Boilerplate forum. But I didnt find any detailed info. I am newbie to abp.
Here is a very nice explanations and sample project using dot net core with Azure ad integration using open connect.
https://azure.microsoft.com/en-in/resources/samples/active-directory-dotnet-webapp-openidconnect-aspnetcore/
You might also be interested in this sample: https://github.com/azure-samples/ms-identity-aspnetcore-webapp-tutorial/
This newer sample takes advantage of the Microsoft identity platform (formerly Azure AD v2.0).
While still in public preview, every component is supported in production environments.
This sample shows how to build a .NET MVC web app that uses OpenID Connect to sign-in users from a single Azure Active Directory (Azure AD) tenant using the ASP.NET Core OpenID Connect middleware.
For a quick start you can use below command
git clone https://github.com/Azure-Samples/active-directory-dotnet-webapp-openidconnect-aspnetcore.git
Flow
Hope it helps.
In my Xamarin Forms(iOS & Android) Application I am using Azure API app for consuming the API's. Previously I was using Bareer Token only for authorisation. And recently the team handling services implemented Client Certificate as an additional security measure. But I am not sure how I can achieve the same in Xamarin Forms.
I am using .Net HttpClient for consuming the API's.
I have found several people asking the same question in the stackoverflow and Xamarin forums. But I haven't get a solution for Xamarin Forms that can be used for both iOS and Android.
I do find people advising to implement this specific to Platform; But there also I can't find any method to use it along with my current HttpClient implementation.
What I am trying to achieve:
I currently have mobile apps on top of services and would like to add a web site on top of the same services.
Services details:
ASP.NET Web API project using OAuth (bearer token) and Identity for authentication and authorisation.
Microsoft.AspNet.WebApi 5.2.3
Microsoft.Owin.Security.OAuth 3.0.1
Microsoft.AspNet.Identity.Core 2.2.1
Mobile details:
Xamarin projects.
Xamarin.Forms 2.3.3.193
What architecture should I use for the web site?
Create a new ASP.NET MVC project and call my current services from the MVC controllers? This seems bad because:
I would have 2 layers of controllers (web site MVC controllers calling services API controllers)
I would need to store bearer tokens in cookies
I would need to manage the tokens and cookies expirations
Create a new ASP.NET MVC project and call current services database directly? This seems bad because:
I would have to duplicate the models in the services project and in the web site project
Create a new ASP.NET project and call my current services using ajax? This seems bad because:
I would need to create my own register/login pages
I would need to store bearer tokens in cookies
I would need to manage the tokens and cookies expirations
I would need to say bye to future social authentication (OAUTH2) implementation because I wouldn’t be using OWIN
Thanks,
fcorbeil
If you already have the API a brand new MVC app shouldn't be such a bad choice. If you have your models stored in a different project just reference them to the MVC one. As for the services, them would work perfectly with the new application. This all can be achieved without changing almost nothing to the current implementation.
I am working on a project and using a similar architecture.
I decided to create an Angular project for the website front end and all it does is talk to the Web API. Angular handles the JWT authentication really well. If you've never worked with Angular before, it is really nice to work with.
However, a vanilla ASP.NET MVC web app would work just as well.
It depends on how comfortable you are with Angular, or how willing you are are to learning it! :)
I am a bit confused as to why there is no Individual User Accounts authentication option in the latest ASP.NET Core Web API template.
Is it still possible to implement individual user accounts the way that the MVC template does or would it not make sense?
Let's say I am creating a stand-alone web API that is going to have all of my business logic and data layer that accesses the database which has the AspNet Identity tables. I plan on making calls to this API w/ an MVC app.
I know one way of doing this is to create an asp.net MVC app w/ individual user accounts auth and simply build the API right within the MVC app using a controllers/api folder. However, I don't want to do it this way because I want the API to be its own standalone project that can be hosted on a completely different server and accessed by multiple applications, not just an MVC app.
Can someone lead me in the right direction on how authentication typically works in this scenario since there is no template?
Individual User Accounts authentication option for the ASP.NET Core Web API is available in .NET Core 2.0 Preview 1.
Unfortunately .NET Core 2.0 Preview 1 isn't available in VS 2017 release.
But you can install Visual Studio 2017 Preview (you can use it side-by-side with VS 2017 stable version) :
I think you can use IdentityServer4 which allows implementing single sign-on and access control for ASP .NET Core Web APIs using protocols like OpenID Connect and OAuth2. It offers integration with ASP.NET Core Identity and Entity Framework Core.
You will need to install to the following nuget package:
Install-Package IdentityServer4
and add the IdentityServer middleware to the HTTP pipeline:
app.UseIdentityServer();
You can find several quick start samples here or follow this article.