SecAddSharedWebCredential working in Simulator but Not working in iPhone Device - icloud

I tried to store ID and password into iCloud Keychain, I have already done with all functionality and coding parts, I can easily store them when I test into Simulator but am unable to work with a real device.
I have also gone through all the useful articles, but still facing the same issue.
SecAddSharedWebCredential("domainName" as CFString, self.strEmailId as CFString, self.strPassword as CFString) { error in
if error != nil {
print(error?.localizedDescription)
return
}
I have implemented the above code for storing ID and password, It works in Simulator but does not work on a real device.
I faced the below error.
("The operation couldn’t be completed. (OSStatus error -25293 - \"doaminName\" failed to approve \"TeamID.BundleIdentifier\")")
Can you please help me out?

Related

AWS Amplify federated google login work properly on browser but dont work on Android

The issues are when I am trying to run federated authentication with the help of amplify auth method on the browser it works fine, but when I try to run it on my mobile.
It throws error No user found when I try to use Auth.currentSession() but the same work on the browser.
tried to search about this type of issue but I found related to ionic-cordova-google-plugin not related to AWS Amplify Federated Login Issue.
Updating the question after closing the question with less debugging information without asking for any information.
This is issues raised in git hub with respect to my problem.
Issue No. 5351 amplify js it's still in open state.
https://github.com/aws-amplify/amplify-js/issues/5351
Another issue 3537 which is still in Open
These two issues has the same scenario like me, I hope its enough debugging information, if more required mention comment instead of closing without notification, it's bullying for a beginner not helping
I fixed the above problem by referring a comment or wrapped around fix.
Link that will take to that comment directly link to comment.
First read the above comment as it will give you overall idea of what exactly the issue is instead of directly jumping to the solution.
Once you read the comment you will be little unclear with respect to implementation as he has use capacitor and not every one are using capacitor.
In my implementation I ignore this part as I am not using capacitor.
App.addListener('appUrlOpen')
Now lets go to main step where we are fixing this issue, I am using deep links to redirect to my application
this.platform.ready().then(() => {
this.deeplinks
.route({
"/success.html": "success",
"/logout.html": "logout",
})
.subscribe(
(match: any) => {
const fragment = JSON.stringify(match).split('"fragment":"')[1];
// this link can be your any link based on your requirement,
// what I am doing it I am passing all the data which I get in my fragments.
// fragments consists of id_token, stage, code,response type.
// These need to be passed to Ionic in order for Amplify to run its magic.
document.location.href = `http://192.168.1.162:8100/#${fragment}`;
},
(nomatch) => {
console.log("Got a deeplink that didn't match", nomatch);
}
);
});
I got this idea by referring the issue in which the developer mentioned of sending code and state along with application deep linking URL.

Facebook Login Error Code 1 Sub code 1357045

I have implemented a login with facebook method in my website. Originally it works fine, but suddenly this past few days it won't work anymore, even tough I don't change any source code or settings. After some tracing, I found the problem is when I call FB.api /me? it returns this error:
Error Code 1
Error Sub Code 1357045
Message Unknown Error (empty response)
Type Http
Status 0
Does anyone can help me, please ??
FIXED:
Problem solve at this thread Facebook Login JAvascript SDK, Content Securty Policy
Also this error can be because of some extension added to your browsers such as addBlock, Ghostery etc. In my case it was Ghostery.

CaptureError.CAPTURE_INTERNAL_ERR on Android trying to use capture.captureImage

I am trying to write a hybrid app for Android using VS 2013 update 3 and the multi-device hybrid app extension (Cordova v3.5.0). Everything is working well except the Media Capture plugin. I am calling navigator.device.capture.captureImage(MediaCaptureSuccess, MediaCaptureError, { limit: 3 }) which opens up the camera app. I can take a picture but when I click Ok on the device, my error callback is executed with CaptureError.CAPTURE_INTERNAL_ERR with no other information. I have tried switching to org.apache.cordova.media-capture#0.3.4 (currently using 0.3.1) but when I try to compile, I get a plugman error when it tries to retrieve it. I have searched the debug output for clues and the only thing that I found was the following line "Unknown permission android.permission.RECORD_VIDEO in package..." but that seems to be a valid user permission. When I look at capture.java generated by the build, I can see that this error is returned if there is an IOException occurs.
Does anyone have any suggestions on how to fix this or what to check next?
Try this plugin
Config:
<vs:feature>org.apache.cordova.camera#0.3.0</vs:feature>
JS:
navigator.camera.getPicture(onSuccess, onFail, {
quality: 30,
destinationType: Camera.DestinationType.FILE_URI,
saveToPhotoAlbum: true
});

SSL certificate verify failure using django and Mozilla Persona

I'm trying to build a simple web app using Django. I'd like a minimal user model with verification using Mozilla Persona. Using Persona happens without a hitch, until the SSL certificate fails when tossing the authentication (success or failure) back to the Django app.
I know there is a lot on Stack Overflow already about SSL errors, but I haven't turned up anything that works in this case. For example, trying to use verify = False when using the requests package still produces the error.
I was able to replicate the error in a minimal example app using the default settings for a new Django project and following the boilerplate installation for django_browserid. Even if this can be hacked, it might be worth noting in either the django_browserid docs or the Persona documentation if someone knows how to remedy this annoying bug.
I've put this minimal example with instructions on GitHub.com at:
https://github.com/pedmiston/ssl_error
The actual error is, with [blob] substituted in place of the assertion.
Error while verifying assertion [blob] with audience http://localhost:8000.
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)
I'm on OSX Mavericks.
Update: I was able to get the minimal example to pass using sigmavirus24's answer, by adding the following to my virtualenv's src/django_browserid/base.py
class RemoteVerifier(object):
"""
Verifies BrowserID assertions using a remote verification service.
By default, this uses the Mozilla Persona service for remote verification.
"""
verification_service_url = 'https://verifier.login.persona.org/verify'
requests_parameters = {
'timeout': 5,
'verify': False,
}
# ...
This is great, and it gets the minimal example to pass (and assures me that this isn't really a django_browserid or Persona error?).
However, it does just kind of by-pass the merits of the verification procedure. Now that the error has been localized, any suggestions for how to fix it?
I've been reading that there were some changes in OS X when Mavericks came around, in a switch from open_ssl to Apple's own Secure Transport engine. If this is the cause of the problem I'm having, then it might be worth knowing for others who run into a similar problem when using Mavericks.
Looking at your example app and it's sole dependency it seems your trouble is coming from this line in django_browserid. I'm not familiar with your app or django_browserid but if you can pass verify=False to https://github.com/mozilla/django-browserid/blob/66641335751b869562ba7a554e61ca56bc880257/django_browserid/base.py#L167 this should solve your problems. In other words, if you specify which Verifier you use, then it should do something like
verifier = RemoteVerifier()
verifier.requests_parameters['verify'] = False
# or
verifier.verify(verify=False)
Of course you didn't show any code where you were doing that so that could be what you meant when you said:
For example, trying to use verify = False when using the requests package still produces the error.
But I can't tell that from the code you have posted.

Getting Not Authorized error from twitcurl timelineUserGet method

I'm currently playing with C++ on Linux and Twitter using twitcurl. I've built twitcurl, and it seems to work generally, I've been able to tweet from a slightly customised version of the twitterClient sample from their project. However, I've been struggling to read user's timelines.
Now, I know general authentication is working as I manage to tweet as the correct user first.
However, when I try to read user timelines using the below code:
/* Get user timeline */
replyMsg = "";
printf( "\nGetting user timeline\n" );
if( twitterObj.timelineUserGet( true, false, 5 ) )
{
twitterObj.getLastWebResponse( replyMsg );
printf( "\ntwitterClient:: twitCurl::timelineUserGet web response:\n%s\n", replyMsg.c_str() );
}
else
{
twitterObj.getLastCurlError( replyMsg );
printf( "\ntwitterClient:: twitCurl::timelineUserGet error:\n%s\n", replyMsg.c_str() );
}
I get the following error:
twitterClient:: twitCurl::timelineUserGet web response:
<?xml version="1.0" encoding="UTF-8"?><hash><request>/1/statuses/user_timeline.xml? count=5?trim_user=1</request><error>Not authorized</error></hash>
I'm unsure whether this is related to the invalid url twitcurl generates with multiple ? symbols which might conflict with authentication.
The full source code can be found at https://github.com/paulspencerwilliams/CPlusPlusSocialPlayground/blob/master/twitterClient.cpp .
The following post helped me to solve the same problem
What steps will reproduce the problem?
Sending certain characters to twitter API (Any character that has to be percent encoding, except the blank space?).
What is the expected output? What do you see instead?
I'd expect
twitter's server to accept my oauth signature but it hits me in the
face instead.
What version of the product are you using? On what operating system?
r88, this problem applies to both linux and wii (through devkitpro)
Please provide any additional information below.
The problem can be fixed by removing the urlencode() calls within buildOAuthRawDataKeyValPairs() in oauth.cpp.
That is according to how twitter says we have to do it. I don't know (did not check) if that's how the oauth spec says it should be done but it is clearly how it works with twitter.
Did you write oauthlib.cpp?