google action account linking Accounts failed to link - oauth-2.0

I want to account for linking google action to my web app. followed the OAuth Client Information. I have implemented
Set Up an OAuth2 Server Using Passport in Laravel( tutorial link).Where I did authentication. finally, I find my application at my home mobile app but when goes to click on MY created app it gives me account linked and after that an error "something went wrong and close" but when I open my
it gives me an error
Accounts failed to link. Please close your browser and try again

The documentation at Add authentication to your project indicates that you need to use the Authorization Code auth type instead of the Implicit flow.

Related

Google Smart Home Actions add device '[test] ACTION is linked' to immediate 'Something went wrong. Try again'

I am creating a new Google smart home Action, and step one is to create an OAuth 2.0 server for account linking.
https://developers.google.com/actions/identity/oauth2?oauth=code&hl=ko&refresh=1
I have follow all of the steps on the Google documentation under the Auth code UP UNTIL 'start the authentication flow'. I do not know if this is required or where this code would go, but that is a different topic.
However, there is an error with my Authentication page. Linking is done with my iPhone's Google Home app, currently which has the generated [test] prefix. When I click the [test] MYAPP, the service runs through till the redirection correctly. The webpage closes and informs me 'MYAPP is linked. As soon as this notification disapears, a new notification 'Something went wrong. Try again' appears.
Clicking the [test] MYAPP to link any time afterwards leads to a blank webpage that says 'Account now linked', but the MYAPP does not move to the 'linked' portion of the Google Home app.
https://developers.google.com/actions/smarthome/develop/error-logging
After checking the logs, I was initially getting 'OPEN_AUTH_FAILURE' for days. Now, I am getting 'BACKEND_FAILURE'.
What is the next step? How can I debug this?
You can use the Google OAuth Playground to verify that your account linking implementation is working properly. Here is how you can configure this tool to test your endpoint:
Open the Settings gear, change OAuth endpoints to Custom
Enter your authorization and token URLs from the Actions console
Enter your client ID and secret from the Actions console
You won't be authorizing any Google APIs, so for Step 1 you can just enter something like "devices" and click Authorize APIs. You can follow through with the flow in Step 2 to verify that the authorization and token exchange work properly. The tool will report if any errors occur in the flow.
If you can successfully verify your account linking implementation, but you are still seeing errors returned in the Cloud console, please file an issue.

Diaglogflow account linking failed for Visual Studio Online

I have spent a lot of time lately trying to link MS VSTS account with Dialogflow. Unfortunately all my attempts failed and I am unable to find out the reason for this.
What I have done so far is:
Went to registered new VSO application (https://app.vsaex.visualstudio.com/app/register), filling in the correct callback URI (https://oauth-redirect.googleusercontent.com/r/MY_PROJECT_ID) also defining the proper scopes.
Got back to Google's action console overview page (https://console.actions.google.com/project/MY_PROJECT_ID/overview/accounts) to fill in the details for the newly created application (authorize URL, token URL etc.) selecting Authentication Code grant type.
Went to Dialogflow to set the "sign in required" for the welcome intent.
Update the action and got the "It looks like your account is not linked yet" message in simulator, but after using the DEBUG URL to complete the process, I received "account linking failed" message for no obvious reason.
I have also tried the linking procedure with 2 other OAUTH providers and it was working flawlessly, but the MS implementation apparently is not standard.

Custom scheme URIs are not allowed for 'Web' client type - Google with Firebase

I am trying to implement google sign in using firebase in to my iOS app. I follow this tutorial.
https://firebase.google.com/docs/auth/ios/google-signin
I have setup the iOS app in firebase and use the google clientID and reversedClientID from the dowloaded GoogleService-Info.plist.
FYI: I have a custom sign-in button instead of the google sign in button. Anyway when i click the sign in button, google following error display in a webview.
I know my problem is the same as which described in this question.
Google 400 Error: invalid request Custom scheme URIs are not allowed for 'Web' client type
But, in my case, I have created the app in Firebase still I get the error. Any idea please...
The first step is to check if you have already the OAuth 2.0 ID for iOS. To do this please open the Credentials page in the API Console. I hope you will find iOS client for your application under OAuth 2.0 client IDs section. If not, please follow this Guide
The second step is to replace the Web Client ID with in iOS Client ID from OAuth 2.0 client IDs section. To do this, you should open the GoogleService-Info.plist and modify following keys: CLIENT_ID with [value].apps.googleusercontent.com and REVERSED_CLIENT_ID with com.googleusercontent.apps.[value].
if you're using flutterfire ui package you need to change the client id parameter in your GoogleProviderConfiguration class with the iOS client id,
you can copy it from here Credential page
example:
providerConfigs: [
GoogleProviderConfiguration(
clientId: "your copied key here"),
]
re-build you're app and you should be good to go
I've just faced this same issue using flutterfire_ui on Flutter.
The error appears to be from a couple of things. As Valeriy points out you need the ios client ID. But I still got the error if I used the scopes
openid
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile",
Instead change these to
openid
email
profile
Strangely the opposite is true for Android, where the WebID and the first of the scopes should be used.
It also pays to be aware of the OAuth Content Screen..
In google cloud go to APIs & Services > OAuth consent screen > Edit.
You can add scopes here and fix any missing required fields that Firebase might not be filling out (I had 1). I believe this takes a while to propagate after a change, so give it an hour.

Windows Azure Active Directory Single Sign On - Custom error page for log in errors

We have successfully set up a Windows Azure AD Tenant and implemented web single sign-on in our ASP.NET application in accordance with this tutorial http://msdn.microsoft.com/en-us/library/windowsazure/dn151790.aspx
We are using Organizational Identities for authentication, but if a user is already logged in to another website using a different Microsoft Account (Windows Live ID) we get a very user-unfriendly error message. - "ACS20016: The domain of the logged in user does not match any allowed domain of this STS."
Is there any way we can provide a more user friendly error message? Is there anything like the Error URL in ACS to redirect users to a custom error page if an error occurs during the log in process?
Totally possible.
ACS gives you error messages in encodeed JSON
like this
{"context":null,"httpReturnCode":401,"identityProvider":"Google","timeStamp":"2010-12-17 21:01:36Z","traceId":"16bba464-03b9-48c6-a248-9d16747b1515","errors":[{"errorCode":"ACS30000","errorMessage":"There was an error processing an OpenID sign-in response."},{"errorCode":"ACS50019","errorMessage":"Sign-in was canceled by the user."}]}
First you need to enable the "Error URL feature" in management portal, for your ACS namespace-> Edit Relying party-> Error URL.
You need a helper classes to decode the JSON. steps here
Configure anon access to them Error page.
With this you are in full control of the page, you can show the error message the way want and brand the page to match the look and feel of your relying party web.

Salesforce Remote Access Authorization Error

I am new to developing a Salesforce app and I am using OAuth 1 for authentication.
I am able to generate the Request Token, and I re-direct the user to the salesforce site.
Once I enter my credentials, I get a
Remote Access Authorization Error
There was a problem in setting up your remote access
with
oauth_error_code=1800
In my Login History page, it shows Status as Success for Application type OAuth.
I don't get any entry in my Debug Logs page.
I have enabled Development Mode.
Any ideas whats wrong?
So https://login.salesforce.com/services/oauth2/success is a stub URL for callbacks - and that is the screen you are seeing there, and the access_token variable is your session ID for the user. So the OAuth flow is working correctly.
In the code, you might check to see if oauthResponse.access_token is getting set correctly. If so, it looks like:
sfw.login( setupHomeView );
That is what should tell it to move from that page to the next UI page.
You might also check out the Force.com Mobile SDK (link). It also includes PhoneGap and has a great OAuth wrapper built in.

Resources