Xamarin iOS : Web View User authentication and SAML Authentication - authentication

I am implementing SSO for my app. I am facing the following problem.
1.) SSO page opens up in web view. How to close the web view after the user is authenticated ? And also how should I capture the cookie or data after login ? Is there any way ?
2.) Backend is using SAML auth. How to implement in my app ? I am using Xamarin iOS for development.

There are two official document here:
For the first question:
https://learn.microsoft.com/en-us/azure/active-directory/develop/howto-v1-enable-sso-ios
For the second question:
https://learn.microsoft.com/en-us/azure/active-directory/develop/howto-v1-debug-saml-sso-issues
These docs can guide you to start project.After that , if have detailed questions ,you can ask new questions.

Related

Auth0 Gmail SS0 doesn't work when I enable Customize Login Page (using auth0 asp.net mvc sample)

This is my ASP.NET MVC sample
Now I'm clicking log in button and it redirects me to the Auth0 custom login page
Now, I'm clicking login with the google button and I already signed in to my Gmail account but it doesn't bring token, and no redirection
URL : https://ishkyteck.us.auth0.com/login?state=hKFo2SBJRWVZQ1F2dk1WeW91Ry1sdVh2SklnQWhVemZjdS1YcKFupWxvZ2luo3RpZNkgb1FGXzRoYjR5a2phTmU2dUNEMGFUcmk0YXN4a1dRYjmjY2lk2SBTbjdld3VBcWk4Y3JyWFVTcjQ2bkYxSEJHZmF2VGl0cg&client=Sn7ewuAqi8crrXUSr46nF1HBGfavTitr&protocol=oauth2&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2F&response_type=code%20id_token%20token&scope=openid%20profile&response_mode=form_post&nonce=637732441711041622.NjQ3MWUxZTYtMTM4Yy00OTQ1LWEyMzUtMTBmN2Y5NjQ5OWVkMzNjYjllMTItNTMwYi00NmIyLWIyMzEtNTY0MjQzNDk1ODll&audience=https%3A%2F%2Fishkyteck.us.auth0.com%2Fapi%2Fv2%2F&x-client-SKU=ID_NET461&x-client-ver=6.7.1.0
and it hits the AuthorizationCodeReceived method but does not bring the token
Please, auth0 community developer look into this bug and resolve. I'm using your provided asp.net MVC sample but it doesn't work.
Sample I downloaded from : https://github.com/auth0-samples/auth0-aspnet-owin-mvc-samples/tree/master/Quickstart/01-Login/MvcApplication
Please help me. Thank you!!
Issue reproducing sample (my auth0 Gmail SSO sample),
https://drive.google.com/file/d/1aHXDCLZjcXth2u1KzON7hhhzKOIv6B0b/view?usp=sharing
When I enable this button, Gmail login does not work in the auth0 universal custom login page
auth0 custom universal login page

Xamarin Forms (iOS) - share cookies between application login and Microsoft PowerApp

Currently I'm trying to create an App in Xamarin Forms that shares its login session (logging-in with Microsoft) with a webview that contains a Microsoft PowerApp (as my application, it uses Microsoft account to login).
I just created a custom webview and a custom webview render. In Android custom render I used Android.Webkit.CookieManager.Instance.SetAcceptThirdPartyCookies(Control, true); to accept third party cookies and it works well.
But I'm having trouble with iOS where I couldn't find a similar way to accept third party cookies and I can't go through it. I've already tried to use NSHttpCookieStorage.SharedStorage.AcceptPolicy = NSHttpCookieAcceptPolicy.Always; but it didn't work for me.
I'm not using Xamarin in a long time, so any help will be really appreciated.
Thanks
S.

React Native Login Using WebAuth redirection to browser from app

when login using Auth0 Webauth in React-Native it opens the browser for login.
I want to create a smooth login so that the user should not able to experienced whether I logged in using App or Browser jut like a webview anyone any idea?
Just to be clear are you asking if Auth0 supports doing this without a browser? Given that it's likely using OAuth2 or OpenID Connect then the short answer is no.
Further to that WebAuthn is a browser-based Javascript API so by definition would require a browser with these features to be available.
That said, there's probably nothing preventing you from implementing a native WebAuthn-like experience using CTAP2 (the protocol that sits underneath WebAuthn) directly or a platform-specific wrapper around the same.

Auth0 Authentication API with React Native

I am currently developing a mobile app in react native and using Auth0 for user management. I am using my own login, signup and forgot password screens instead of their lock widget. I was able to implement passwordless sms and email by calling their authentication api as well as account linking by using their management api. However, I am having difficulty authenticating in a user with their email and password through the api once they already have an account. It seems to me that there should be a single endpoint for this in which you include the email and password in the body of the request. I was wondering if anyone could help me understand how to simply login users using auth0's api. Thanks in advance.
Take a look at this react native (embedded login custom UI) sample (slightly dated) - wrote it around 6 months ago, but it should offer you good insights - https://github.com/auth0-samples/react-native-embedded-login
Sign in logic is here
Feel free to leave questions below.
For anyone who is still looking there is this step by step on their website on how to login with password via API: https://auth0.com/docs/get-started/authentication-and-authorization-flow/call-your-api-using-resource-owner-password-flow
And with this endpoint you can register a new account: https://auth0.com/docs/api/authentication#signup

Multiple ember apps with one login app

I have multiple ember apps, but just one of them has the login page. I want to authenticate all of them with this unique page. How can I redirect other apps to an external login page using ember-simple-auth and redirect to the corresponding app after the authentication?
You need to write custom authenticator. In it's authenticate method I suggest to not redirect, but open a child window with login page. And that login page should be able to communicate with your ember app in some way (window.postMessage for example) in order to give your app auth token. Authenticator must wait until it receive answer (promise and timer will help with waiting). I used such method with google's oauth in node-webkit application (my authenticator opens google's oauth page where user prompted to give my app an access). I don't want to share a code because its too big, complex and have code specific to nw.js but I hope my answer will help. I used code of oauth2 authenticator to develop my own, it helped me a lot.