As i am new to react native stuck at one point.
I am developing an app in which i am using wordpress as a backend to store the new users data.
To Create a new user i need authentication as i am using wp rest api plugin to create user.
For authentication i have used Oauth Server plugin in wordpress admin.
Now issue is as per the Oauth documentation i need to get the authentication code in my app.
So want to know how to redirect_uri to our react-native app so that i can get authorization code in app?
To get authorization code in react-native app, You need to set the custom Url scheme.
twitter has well documented guide to create it.
https://dev.twitter.com/cards/mobile/url-schemes
After creating the Url scheme. You need to set the redirect_uri as explained here in wp-oauth server's docs Step 2 and replace the created custom url of your app in redirect_uri.
This will redirect you to your app when oauth server's callback with the access token that you can use in your react-native application.
Related
I have a firebase project set up where I am only using the firebase auth features. I have a react app that uses the firebase client-side javascript SDK for authentication and a custom backend + database that does not use any firebase features.
Currently when users are logging in with a popup flow, they see the auth domain "myappname.firebaseapp.com" as per the default firebase config. It all works great.
However, if I now want to set up a custom auth domain, what I've gathered from other answers is that I need to:
Add an authorized redirect URI in firebase console to point to my custom auth domain, say https://auth.myappname.com/__/auth/handler
Change authDomain in my client side code (firebaseConfig object) to my custom auth domain.
Is there anything else I need to do for this to work? How this can work out of the box without me having to write some custom redirect logic? If my react app is being served via static hosting like an S3 bucket, then I won't even have a server running. How is https://auth.myappname.com/__/auth/handler handling anything?
Much of the documentation online is talking about using firebase hosting or other firebase black magic which I do not want to use.
Any explanations appreciated..
We are working on an application that uses firebase for authentication purposes. We implemented the authentication mechanism in our angular application and everything works fine. what we want now is to add custom claims to the JWT tokens generated once the user is authenticated. We know about the Admin SDK here:
https://firebase.google.com/docs/auth/admin/custom-claims
but this requires the addition of a web service. is there a way to configure firebase via the portal to add a default custom claim for all existing users and new users. what we want is to add an "id" field with random GUID. is it possible to use the Admin SDK to configure this behaviour once and for all?
Thanks in advance.
There is no way to add custom claims without using the Admin SDK. This requires that you run a script on a trusted environment, such as your development machine, a server you control, or Cloud Functions for Firebase. The latter is probably your best option if you want to do this regularly, and don't have your own server.
I have a web app developed using Firebase. It is hosted by Firebase and my domain is connected to it. It uses Google as an identity provider for authentication. However, when signing-in via a popup, the Google 'OAuth consent screen' provides a link direct to the Firebase project.
Is there a way to make the link point to the associated web site?
Turns out there is an easy solution for my scenario. Just needed to set the authDomain parameter of config passed to the firebase.initializeApp() method to my domain (rather than the default <project-name>.firebaseapp.com value). Initially this will cause the OAuth screen to throw an error but it includes a link to a configuration page where I needed to add https://<my-domain>/_auth/handler to the list of authorization handlers.
I am trying to setup Firebase custom OAuth using Java as JWT server. I am able to successfully setup this.
But when I am trying to login using the custom token the provider field in the Auth page leaves empty any help how to setup to my own text?
Currently I have a very simple google authentication built-in from ASP.NET website wizard using Microsoft.AspNet.Membership.OpenAuth
with just a single code line in AuthConfig.cs file
OpenAuth.AuthenticationClients.AddGoogle();
and now I get an error from google
OpenID auth request contains an unregistered domain
The problem is that I don't know how to update the website to support the new authentication method, I got an api key from google, but the OpenAuth.AuthenticationClients.AddGoogle does not support parameters like the function for Facebook or twitter authentication.
If you are using OpenID2 in your code, the problem could occur because Google has disabled OpenID2 for new domains.