How do use ionic 6 with Auth0 ionic sample - ionic-framework

I am using the https://github.com/auth0-samples/auth0-ionic-samples/tree/main/angular and following the examples in the readme file to to letter
Allowed Callback URLs:
com.auth0.samples://XXXX/capacitor/com.auth0.samples/callback, capacitor://localhost, http://localhost, http://localhost:4200
Allowed Logout URLs:
com.auth0.samples://XXXXX/capacitor/com.auth0.samples/callback, http://localhost:4200
Allowed Origins (CORS):
capacitor://localhost, http://localhost
Allowed Web Origins:
http://localhost:4200
And it worked twice and then all further testing I received this error
Failed to launch 'com.auth0.samples://dev-zhh5r4vf5zhgl2w4.us.auth0.com/capacitor/com.auth0.samples/callback?code=XXXXX&state=OGhsemEyWmF3MXlrOHkyVjRsanRhOVVKZ1dNZjdSb0swMlc3OWUtVnZYOA%3D%3D' because the scheme does not have a registered handler.
Has anyone else received this error and what was the fix?

Related

.NET Core Facebook - "Please make sure your redirect_uri is identical"

I'm out of ideas. I have a .NET Core 2.1 web app using Facebook Login. Facebook Login worked just fine until I upgraded from .NET Core 1.1 to 2.1. This works fine locally (localhost), but fails on our staging server (Apache on CentOS, EC2).
Our Facebook Login redirect URI is set up correctly in the Facebook app's login settings: http://example.com/ and https://example.com/ (see screenshot below).
What's interesting is in our .NET Core 1.1 branch, the request to http://example.com/signin-facebook?code=SOME_CODE shows up in the log once. In our .NET Core 2.1 branch, the request shows up twice, back-to-back.
Any idea how to dig more into the Facebook middleware that IdentifyFramework is using under the hood?
Facebook Login Settings:
Debug Log:
.NET Core 2.1.802, CentOS (Linux), EC2 instance
// debug ouput
AuthenticationScheme: Facebook was challenged.
Executed action Foobar.Controllers.AccountController.FacebookLogin
Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 2.1144ms 302
Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://example.com/signin-facebook?code=SOME_LONG_CODE
Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://example.com/signin-facebook?code=SOME_LONG_CODE
Error from RemoteAuthentication: OAuth token endpoint failure: Status: InternalServerError;
Headers: WWW-Authenticate: OAuth "Facebook Platform" "invalid_code"
"Error validating verification code.
Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request"
Error from RemoteAuthentication: OAuth token endpoint failure: Status: InternalServerError;
Headers: WWW-Authenticate: OAuth "Facebook Platform" "invalid_code"
facebook-api-version: v2.12

Yahoo social/contacts api -> update contact (PUT method)

So.. The application I wrote ages ago to update yahoo contacts seems to have quit working... It was using oauth1 to authenticate...
doing a PUT to http://social.yahooapis.com/v1/user/me/contacts
gets me a 404 Not Found on Accelerator error
<!-- status code : 404 -->
<!-- Not Found on Accelerator -->
<!-- host machine: e20.ycpi.cha.yahoo.com -->
<!-- timestamp: 1506448562.000 -->
<!-- url: http://social.yahooapis.com/v1/user/me/contacts-->
Thinking the issue may be their oauth1 api.. I switched to oauth2
same error
So I try http://social.yahooapis.com/v1/user/me/contacts (httpS)
I get
401 You are unauthorized for this operation
I'm using scope sdct-w (https://developer.yahoo.com/oauth2/guide/yahoo_scopes/)
Is Yahoo Contacts API dead or am I doing something wrong?
https://social.yahooapis.com/v1/user/{guid}/contacts
a) the endpoint is now https (documentation still shows http)
b) used to be able to use "me" for the {guid} ... this is no longer the case
You have to add access token on your request.
Try:
https://social.yahooapis.com/v1/user/me/contacts?access_token=${access_token}&format=json

Cors request Rejected

I am facing an error and I don't known what to do. Whenever I try to save user to my ionic user service using the following code:
Ionic.io();
var user = Ionic.User.current();
if (user.id) {
user.set('name', username);
//user.set('image',image_name);
}
user.save();
and then I get this error:
Ionic User: Error: CORS request rejected
XMLHttpRequest cannot load https://api.ionic.io/auth/users/null.
Response for preflight has invalid HTTP status code 404
OPTIONS https:// api .ionic .io /auth /users /null
[cors request rejected][1]
[coding][2]
Ionic has a cordova plugin that sorts out all CORS issues called "cordova-plugin-whitelist". When you test through the browser, the Cordova plugins are not active, hence it's not sorting out your issues. Only when you deploy your app to android/ios/windows will the Cordova plugins work.
Rather get "Allow-Control-Allow-Origin" chrome plugin to allow you to make requests if you want to test on your browser.

Mule Facebook Samples Invalid redirect error

I have seen a lot of these errors all over the net with different developer framework
{
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191
}
}
I am using Mule ESB to post a comment on a wall but get this error. I have used localhost and the IP address of my PC but nothing seems to work. I am behind a proxy server so not sure if that is the problem. It also seems that Facebook has chaned the UI of the apps page as a lot of sample refer to pages that do not exist anymore.
How do I get my Facebook page to accept my auth and then post using Mule.
Regards.
Jaco.
Have you configured Facebook properly? They tend to change their app system every few months, so any example is usually outdated. The following works with my test app (just tests auth, does not save token):
FB App:
Settings
-> Basic
-> Add Platform
-> App on Facebook
-> Canvas URL: http://localhost:3000/
Mule:
<facebook:config-with-oauth name="Facebook" appId="${id}" appSecret="${secret}" doc:name="Facebook">
<facebook:oauth-callback-config domain="localhost" localPort="3000" remotePort="3000"></facebook:oauth-callback-config>
</facebook:config-with-oauth>
<flow name="authorize">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="3000" path="authorize"></http:inbound-endpoint>
<facebook:authorize config-ref="Facebook"></facebook:authorize>
</flow>
If you have a proxy / port forwarding in your environment, you should add the remotePort option explicitly. I run my Mule inside a virtual machine, and it produces the invalid url error without it.

ACS/Facebook Integration - ACS40001: An error occurred while attempting to get an access token from Facebook

Getting the following error setting up ACS/Facebook integration:
HTTP Error Code: 502 Message: ACS40000: An error occurred while
processing a Facebook sign-in response. This may be caused by invalid
configuration of the Facebook application. Inner Message: ACS40001:
An error occurred while attempting to get an access token from
Facebook. Inner Message: ACS90005: Web exception Trace ID:
988ec1a7-e02b-4dcf-abab-51812745a121 Timestamp: 2011-07-12 19:59:51Z
I've verified that App ID, App Secret, Site URL and Site Domain have all been set.
For Site Url, we're using https://project.accesscontrol.windows.net
For Site Domain, we're using project.accesscontrol.windows.net
I'm using the following as a guideline:
http://blogs.objectsharp.com/cs/blogs/steve/archive/2011/04/21/windows-azure-access-control-services-federation-with-facebook.aspx?CommentPosted=true#commentmessage
http://www.leastprivilege.com/AccessControlServiceV2AndFacebookIntegration.aspx
Any ideas would be appreciated.
Just checked my (working) settings. Differences I see:
I did not enter a Site Domain over at Facebook
On the ACS side, I have "Application permissions" set to "email" (not sure if you have something entered there?)