If introduce "Xamarin.Auth" from Nuget,
"ApplicationName, Hello, library_name" of Resource.Designer.cs disappears and an error is output. What is the solution to this?
I changed my mindset.
I thought about introducing only PCLCrypto necessary for encryption. However, even when PCLCrypto is installed, it can not be found in namespace. What is the countermeasure in this case?
When PCLCrypto is put in PCL and each platform, PInvoke.Windows.Core etc etc can not be added to reference and will not be installed. If you install on PCL only, you will get an error "Perhaps it doesn't exist in the Mono for Android profile?" on build. What should I do?
If someone else tried it. Naturally, it has been successfully installed without any problems.
Apparently there seems to be a problem in my environment.
When installing PCLCrypto in my environment, PCL has unnecessary "
Plnvoke.BCrypt, Plnvoke.Kernel 32, Plnvoke.NCrypt, Plnvoke.Windows.Core "
It seems that it enters. But I do not know if this is the cause.
The project which I asked a friend to create was successfully built.
Why only me?
I made it in the following way.
But I can not get good results. Is there any problem?
var key = WebUtility.UrlEncode(CONSUMER_SECRET);
var method = "POST";
var parameter = new Dictionary<string, string>();
parameter.OrderBy((x) => x.Key); ;
var setArray = new List<string>();
foreach (var item in parameter)
var keyValue = item.Key + "=" + item.Value;
var combination = string.Join("&", setArray);
var urlEncode = WebUtility.UrlEncode(combination);
var oauth_signature = method + "&" + WebUtility.UrlEncode(REQUEST_TOKEN_URL) + "&" + urlEncode;
var hmac = new HashHmacSha1();
var hash = hmac.HashHmac(oauth_signature, key);
var base64 = Convert.ToBase64String(utf8.GetBytes(hash));
var content = new FormUrlEncodedContent(parameter);
var http = new HttpClient();
var response = http.PostAsync(REQUEST_TOKEN_URL, content);
var get = response.Result;
public string HashHmac(string data, string key)
var mac = MacAlgorithmProvider.OpenAlgorithm(MacAlgorithm.HmacSha1);
var keyMaterial = CryptographicBuffer.ConvertStringToBinary(key, Encoding.UTF8);
var cryptoKey = mac.CreateKey(keyMaterial);
var hash = CryptographicEngine.Sign(
cryptoKey, CryptographicBuffer.ConvertStringToBinary(data, Encoding.UTF8));
I was thinking on Twitter's OAuth 1.0 protocol, but the OAuth 2.0 protocol seemed easier.
At such time, I saw the following page.
OAuth 2.0 may be better than OAuth 1.0.
I have considered OpenID Connect.
How about Xamarin.Auth?
I looked for a way to use OpenID Connect from Xamarin application.
the following page was found.
I was able to approve it for the time being at Xamarin.Auth.
At first I felt troubled that the GetUI method was missing, but I found that I write on each platform by DependencyService and custom render instead of PCL. Of course we found the GetUI method.
Twitter could be authorized, but google, facebook has not been created yet.
I was able to approve it even on facebook.
I am currently trying google. However, it can not be licensed. 403 error is output. Apparently google seems to be unauthorized because it abolished the request from WebView. How do you solve it?
I put Oauth on hold in my application. Currently we are considering implementing it on the server side, but it will be for the time being. (Deep sigh) Does not an authentication method replace Oauth announced?
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies