In firebase,I've setup a custom domain and it is working.But while FB or Google Authentication in application,the custom domain doesn't working - firebase

I've connected to a custom domain in firebase project. And my web application is hosted and wrking in that custom domain. But in my web app I'm using Firebase sign-in method for Facebook and Google. So when I click login Google box comes up. In that my custom domain is not shown. instead the firebaseapp with my projectid.com is shown. how to resolve this.

Did you replace authDomain in your initialization code to use the custom domain?
You need to do that: https://firebase.google.com/docs/auth/web/google-signin#customizing-the-redirect-domain-for-google-sign-in

See Authenticate Using Facebook Login with JavaScript documentation. Try and add your custom domain in there too.
make sure your OAuth redirect URI (e.g.
my-app-12345.firebaseapp.com/__/auth/handler) is listed as one of your
OAuth redirect URIs in your Facebook app's settings
page on the Facebook for Developers
site in the Product Settings > Facebook Login config.

Follow Customizing the redirect domain for Facebook sign-in which explain the basic steps you have to do.
I want to highlight point 3, as it's the hard part, because it has almost no details. You need to go to GCP Console > Select project > API Manager > Credentials > Add your my.domain/__/auth/handler link in #2 to the 'Authorized redirect URIs'

Related

How to enable redirect in Drupal 9 on launch of application

I have enabled Keycloak authentication in a website built with Drupal. As soon as I launch the website I want to redirect to Keycloak's login page if the user is not signed in.
Is there any way to achieve this as soon as I open the website
I tried making the default front page of Drupal website as localhost:8080 (which is where Keycloak's login page is present) but was unable to do it.
If you are experienced with writing custom modules, you can write your own implementation of event subscriber. Here is a good example of it:
https://drupal.stackexchange.com/a/223109/5644
If not, then I recommend the module https://www.drupal.org/project/redirect - I am not 100 per cent sure if it lets you to specify redirect only for anonymous but it is definitely worth trying.
I am assuming that the integration with the Keycloak service is working and out of scope of this question.

Subdomaining in Firebase Hosting

I have a Firebase project with Hosting enabled. My default url (given by Firebase) is
<PROJECT_NAME>.web.app. How can I also deploy to dashboard.<PROJECT_NAME>.web.app? I want authenticated users to be able to see this special dashboard.<PROJECT_NAME>.web.app url.
Whenever I try adding this as a custom domain, Firebase asks me to add some stuff regarding to web.app, which I can't.
Note: I am using React for my project.
You don't get any control over the web.app subdomain that's automatically created for your project. That is entirely managed by Google. If you want to customize a domain, you will have to register one of your own and manage its DNS for use with Firebase Hosting as described in the documentation.

reCaptcha Invalid domain for site key key error

reCaptcha on the subsite mapped to custom domain showing invalid domain for site key error.
We are implementing a multisite solution in which our main site domain is http://www.oursite.net.
Our subsite has 2 types.
1) using the subfolder structure, so the URL is www.oursite.net/abc
2) mapped to a custom domain, so the URL is www.xyz.com
Each of our subsite has its own registration form which is associated with a recaptcha form powered by your solution.
For all subsites using the subfolder URL, the Recaptcha is working fine. See this screenshot:
https://drive.google.com/file/d/1MkIfM7frQBCYBAldkKZ0PAuSViNSSBc7/view?usp=sharing
For the ones mapped to the custom domains, we keep getting this Invalid Domain error. See this screenshot: https://drive.google.com/file/d/1-R1RfH18RJATLAYbHYp7uLZ6ia66HmL8/view?usp=sharing
Before we apply the recaptcha to the subsites with custom domains, we have tried both of the following:
1) add the custom domain (xyz.com) to the reCaptcha setting for oursite.com under the Google Developer console.
2) create a new reCaptcha key for the custom domain (xyz.com) via the Google Developer console.
Each time, we copied and pasted the latest reCaptcha key to the plugin setting.
None of these 2 measures help.
Please advise.
Desired outcome: on the subsite mapped to custom domain, reCaptcha is rendered properly.
This is possible to implement reCAPTCHA Version 2.0 without verifying each domain:Visit https://developers.google.com/recaptcha/docs/domain_validation
See the admin console and click the API key in question under
"Your reCAPTCHA Sites".
Then under "Advanced Settings",
uncheck Verify the origin of reCAPTCHA solutions

Login to wordpress website using an existing google

I have a wordpress site.
currently I don't have any login/registration page/form in our website.
I need to create a login page where user can login using an existing google account. it should be the only way to login to our website. Please note, I'm not talking about login page to wordpress admin pages...I'm talking about login page for website.
Steps:
1) user goes to my website
2) click login link
3) navigates to goole sign in page
4) sign in
5) back to the website , the user is logged in
Is there any WP plugin for such case.
TIA, Anna
Bear in mind that the login page for the WP admin pages is the default login screen for users as WP understands them. I don't know what you expect logged-in users to be able to do or see, but you'd have to manage that access at a different level if you're not using the WP users.
If you just want commenting but with Google logins (and others) I'd recommend Disqus.
You need to sign up with Google for this: https://developers.google.com/accounts/ There are several options there like using Google+ log-in, etc.
I haven't seen a wordpress plug-in for it, and even if there is, you'd probably have to register with Google somewhere in the above link because they need to give your specific website permission.
If you want to cut to the chase, look at this link which talks about installing the google button using HTML https://developers.google.com/+/web/signin/add-button

the facebook app domains format error

i have a web site,
which is very basic. (www.mychecktest.com)
but i couldnt configure the facebook login integration.
for some users i try facebook integration i m getting the following error.
Given URL is not allowed by the Application configuration.:
One or more of the given URLs is not allowed by the App's settings.
It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
but some users can easily login with facebook. i dont know why
the following picture is my app settings page and
what exactly should i write to app domains. or sthng else is wrong? whatever i tried so many things. but i couldnt achieve.

Resources