Yii2 : AuthClinet + Facebook login - yii2

i've create a Facebook login app and it works fine when it on localhost but when I published it online it gives me an error :
Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.
i've update the app setting to be :
App Domains : *******.com
and also
Site URL :https://********.com/
and in Facebook login app setting is
Client OAuth Login : No
but error still appears

Related

How to login to McMaster-Carr API

I am a beginner trying to log in to McMaster-Carr API. I have a .pfx authentication file, an API password, and my main login/password (email/account password). I have imported the .json file into postman and have inputted my main login credentials in the fields below, but I am not getting a success output message. I am confused as to where the API key/password goes and where I upload the .pfx file as well.
McMaster-Carr API: https://www.mcmaster.com/help/api/
How to upload .pfx file to Postman application
[ Windows / Linux ] - Select File > Settings > Certificates
[ Mac ] - Select Postman > Preferences > Certificates
On the Client Certificates section, select the Add Certificate link
Add the hostname domain of the API service: api.mcmaster.com
Upload the .pfx file
Add the passphrase for the .pfx file: API password
Select Add (details should appear as below)
Close the screen and try to log in again with the same request

Sync Chrome extension login with web app (Next JS)

I'm trying to sync chrome extension and web app login. I'm currently using Next Auth to get the access token for a provider. Any one has experience with it ? I am able to send message from the web app to the extension with the access token, but not sure how I can authenticate the user in the extension.
You can get Google auth token and authenticate the user, it will ask user to choose g-profile & login. Here is code that works for me:
backgroung.js:
chrome.identity.getAuthToken({ 'interactive': true }, function(token) {
console.log("token: " + token);
});

Postman Oauth 2 callback url - Chrome App

I am using The Chrome App for Postman and I am setting up my Access Tokens using OAUTH2. When I fill out the form, I am using the following:
Auth Url: https://[MY_API_URL]/api/authorize
Access Token URL: https://[MY_API_URL]/api/request/token
Client ID: xxxxxxxxxxx
Client Secret: xxxxxxxxxx
Scope: blank
Grant Type: Authorization Code
The callback url in my outh server is set to "https://www.getpostman.com/oauth2/callback"
When I click Request Token, I am taken to the proper Authentication page. When I submit my credentials, a new Chrome tab opens up with a blank page with the url https://app.getpostman.com/oauth2/callback?code=xxxxxxxxxx
I expect that this is supposed to redirect to the app so it can perform the access token request. from the access token url, but nothing is happening. Is this not the right callback uri?
This is an old question and things have changed since.
Google deprecated Chrome Apps, so Postman had to deprecate their old Chrome App client too, and so the old redirection URL (https://www.postman.com/oauth2/callback) no longer works.
According to this, with the more recent versions of Postman, the new redirection URL is https://oauth.pstmn.io/v1/callback.
You have change your permission type. Use Client Credentials instead of Authorization
I also faced same problem.
Just change Grant Type: Authorization Code to Grant Type: Client Credentials.
It worked for me.
Certainly as mentioned in other comments, for client_credentials it would work but for the Implicit or Authorization Code, I used "https://app.getpostman.com/oauth2/callback" as the callback url and it worked. Also it need to be configured in the application settings in oauth provider.
I've been using this callback url:
https://getpostman.com/oauth2/callbackurl

Yii2 authclient Error: redirect_uri_mismatch

I am implementing yii2 authclient, I created the client id in in google api console this is the redirect url I created in gogle console with the corresponding client id.
http://mysite.x10host.com/oauth2callback
when I access my site login this is how it looks like
http://mysite.x10host.com/home/mysitex/public_html/web/site/login
when I click the the google icon
That’s an error.
Error: redirect_uri_mismatch
Application: Project Default Service Account
You can email the developer of this application at: myemail#gmail.com
The redirect URI in the request: http://mysite.x10host/home/mysitex/public_html/web/site/auth?authclient=google
can someone help me on this.
Thank you in advance

Hangout app XMLHttpRequest cannot load error when trying to call a .php file to get data

I am trying to talk to mysql from my Google Hangout app and the test code works fine from an HTML page, but gets blocked when I run it in the app .XML wrapper in a hangout.
There I get this in the console (I had to replace the URLs due to me being new here) :
<<<<<>>>>>
XMLHttpRequest cannot load XXXXXX MY file URL XXXXX. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https XXXXXX GOOGLE USER CONTENT XXXXX' is therefore not allowed access. ifr?url=app%3A%2F%2F609528936436%2Fhangout&container=hangout&view=default&lang=all&country=ALL&debu…:1
GET XXXXXX MY file URL again only with https XXXXX net::ERR_CONNECTION_REFUSED ifr?url=app%3A%2F%2F609528936436%2Fhangout&container=hangout&view=default&lang=all&country=ALL&debu…:1199
XMLHttpRequest cannot load XXXXXX MY file URL XXXXX. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https XXXXXX GOOGLE USER CONTENT XXXXX' is therefore not allowed access. ifr?url=app%3A%2F%2F609528936436%2Fhangout&container=hangout&view=default&lang=all&country=ALL&debu…:1
<<<<<>>>>>
What am I doing wrong? Thank you!
ANSWER Thanks to Gerwin Sturm:
Your problem seems to be that with the Hangout App running inside of an iframe hosted on Google servers your server refuses to send content to this different domain.
Two possible solution:
1) Set the headers on your server to allow cross-origin request. In your php script you should be able to do this by calling
header("Access-Control-Allow-Origin: *");
2) Use https://hangoutiframer.appspot.com, which allows you to run the hangout app on your own server, preventing CORS problems that way.