Answer the question
In order to leave comments, you need to log in
How to perform Oauth 2.0 authorization on android without third-party libraries?
As after receiving the authorization token by this method:
public void getAuthToken(Account account, final OAuthCallbackListener authCallbackListener) {
accountManager.getAuthToken(account, SCOPE, null, act,
new AccountManagerCallback<Bundle>() {
public void run(AccountManagerFuture<Bundle> future) {
try {
String token = future.getResult().getString(AccountManager.KEY_AUTHTOKEN);
authCallbackListener.callback(token);
/*
Intent launch = (Intent) future.getResult().get(AccountManager.KEY_INTENT);
if (launch != null) {
act.startActivityForResult(launch, 0);
return;
}
//*/
} catch (OperationCanceledException e) {
authCallbackListener.callback(null);
} catch (Exception e) {
e.printStackTrace();
}
}
}, null);
}
Answer the question
In order to leave comments, you need to log in
In short, you must make a get or post request containing your token to the server and process the result that came from it. I just can't figure out where you log in? After all, for different services, authorization methods are different.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question