Android: how to get YOUR_AUTHENTICATION_ENDPOINT for SSO on GMAIL?
I am trying to implement a single mark (GMAIL). Try this link https://developers.google.com/accounts/docs/MobileApps sample code. I was unable to get the token key YOUR_AUTHENTICATION_ENDPOINT. please help me to get the keys of the YOUR_AUTHENTICATION_ENDPOINT token.
here is my main one. Activity when I use YOUR_AUTHENTICATION_ENDPOINT.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflating the menu resource.
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.my_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
// Start the WebViewActivity to handle the authentication.
case R.id.login:
Intent intent = new Intent(this, WebViewActivity.class);
intent.setData(Uri.parse(YOUR_AUTHENTICATION_ENDPOINT));
startActivityForResult(intent, 0);
return true;
// Exit.
case R.id.exit:
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
application during work. I am getting this error:
04-02 15:09:12.271: E/Web Console(924): SyntaxError: Parse error at https://mail.google.com/mail/x/cc6i6zigt73b-/?pli=1&f=1&shva=1:1
I need urgent help .. please, please, please, someone can help me.
or give me another option or methods to implement a single sign for GMAIL
Thanks in advance...
source to share
For a google app guest account, the login URI is:
https://myapp.appspot.com/_ah/login?continue=REDIRECT
Where myapp
is your application name and REDIRECT
is the domain to which you will receive additional authenticated resources. Cookies will be set by the appropriate authentication mechanism. https://myapp.appspot.com
is what i use as REDIRECT
.
EDIT
Sorry, but I misunderstood your question. You want to authenticate using web authentication. I gave you an endpoint to authenticate with a google account on one phone. For login URLs, you can use users.create_login_url()
and users.create_logout_url()
. More details here: https://developers.google.com/appengine/docs/python/users/loginurls
source to share