Signin via Google+ or Facebook? - Java for Android App Development

Hello,
I am developing an App that requires the user to create an account and to sign in using that account. To make it easier for the user (certainly not for me), I want the user to create his or her account using an existing Google+ or Facebook account.
So my idea was:
Sign the user into Google+ on the device
Aquire the email address and and an oauth2 access-token for the user the
send those two to my server application
validate the email using the oauth2 token by reading it from the google server
create an account on the server, storing the email and generate a "password"
send the password back to the android app to authorize future calls to my server using the email and generated password
I am not sure if this is the recommended procedure for my problem, but anyway, I am failing at the third step.
Could someone please tell me if I am on the right way or should I solve the problem in some other way?
(mods: why does it say "this is not a Q&A forum but has Q&A in the title?)

onlyolli said:
Hello,
I am developing an App that requires the user to create an account and to sign in using that account. To make it easier for the user (certainly not for me), I want the user to create his or her account using an existing Google+ or Facebook account.
So my idea was:
Sign the user into Google+ on the device
Aquire the email address and and an oauth2 access-token for the user the
send those two to my server application
validate the email using the oauth2 token by reading it from the google server
create an account on the server, storing the email and generate a "password"
send the password back to the android app to authorize future calls to my server using the email and generated password
I am not sure if this is the recommended procedure for my problem, but anyway, I am failing at the third step.
Could someone please tell me if I am on the right way or should I solve the problem in some other way?
(mods: why does it say "this is not a Q&A forum but has Q&A in the title?)
Click to expand...
Click to collapse
I assume you follow Google's guide on G+ signin? I think that is a good way to do it, but I'm not so sure about that "password" you generate on your server. Wouldn't you just use the Android device id or something like that to validate the account?

SimplicityApks said:
I assume you follow Google's guide on G+ signin? I think that is a good way to do it, but I'm not so sure about that "password" you generate on your server. Wouldn't you just use the Android device id or something like that to validate the account?
Click to expand...
Click to collapse
Thank you!
I prefered using some server secret over the android device id, cause that one is not known to other applications.
Right now i guess i have the problem that the google api is not really picking up the certificate hash and as such is not using the correct project on the api console - that would explain why i am getting "api not configured" errors and why no api access is monitored on the developer console. Maybe. -.-

Related

Windows Mobile 5.0 Email Bug

I would like to kno if anyone in xda was able to address the problem with the wm5 client address on a forum i read about, i beleive i am havin the same problems
"the Pocket tv team"
we found a bug with the Windows Mobile Email client that prevents using
certain SMTP servers.
i suspect the bug is general to all Windows Mobile devices including Pocket
PCs, but we only tested it and confirmed it on the Motorola Q (a Windows
Mobile 5.0 Smartphone).
the bug prevents using some login names on SMTP servers (i.e. outgoing
email) that require a user name DIFFERENT from the POP3 ou IMAP4 server
(i.e. incoming email) and when the login name is something like
'[email protected]' i.e. when the login name contains an '@' sign.
this type of server login name is common on servers that use shared domains
on a single IP address, and this is a common case. in this case, since
there may be several users with the same name under different domains (on
the same server), the correct user is identified by using the domain name
with the '@' sign.
in fact i found that bug by trying to configure the Motorola Q to use one of
our email servers to send my email.
what happens is that the Smartphone email client removes the @ sign and
everything that follows it when loging to the SMTP server - we confirmed
that by looking in real time in the log files produced by our SMTP server.
i am not aware of any workaround.
the problem does not happen when the SMTP server uses the same login name as
the POP3 or IMAP4 server (in that case, the login name can have an "@" sign,
and it is handled correctly). the problem only happens when the SMTP server
uses a different login, and that this different login has an "@" sign.
once again, MSFT was apparently trying to be "smart" i.e. they assumed that
the @domain part in the login name of the SMPT server was entered by mistake
by the user, but being too smart is not always a good thing.
note that using fully-qualified user-name that include a mandatory @domain
part is very common and even google's gmail uses this, as you can see in the
'Account Name' section of
http://mail.google.com/support/bin/a...y?answer=13287 .
if you use gmail to both receive and send email, it will work, because the
POP3 and SMTP servers use the same login. but if you want to use gmail just
to send (i.e. SMTP), and use another server to receive (i.e. POP3 or IMAP4),
then it won't work, because of that bug.
this is a pretty serious problem.
also, the IMAP4 client configuration does not allow to specify the remote
directory (in the user's account on the IMAP4 server) where the IMAP folders
are located, which may be different from the default login directory. This
renders IMAP4 completely un-usable in some cases.
Of course those bugs are not new to Windows Mobile 5.0. It's just a shame
that MSFT never fixed them.
Click to expand...
Click to collapse

Accessing Company Email

Quick question .. not sure if anyone can help or not.
My Company uses Xchange email and was wondering if there was a way to get this email pushed on to the phone first. I guess the main problem is that I am not sure if the company has pop enabled. Not really even sure what the incoming mail server and outgoing mail server are or where to find this information. Asking them really isnt an option... any thoughts?
This is the first thing that i tested with my Dopod. When it asked for servers, i just put in the web address to our Outlook Web Access site.
Hard reset after about 30 mins because my server enforced a 30min lock policy and i wasnt sure if i was allowed to hook my dopod upto the exchange server (we have strict policies about attaching non approved hardware to servers and or network)
Exchange servers don't use POP or SMTP, they use Exchange. So there are no 'incoming' or 'outgoing' mail server names.
Get your Exchange server address from your internal tech support group or your system administrator and go through the email account setup on your phone. You'll find one of the options early on is "Exchange Server".
You say that asking them for this info isn't an option, but it's the only way you're going to get this information. If you know where to look on your desktop, you can check your Outlook installation for the Exchange server name there. Otherwise, you're stuck having to ask someone.
If you just simply can't ask anyone, and can't find out on your own, it's a safe bet that your company doesn't want you to do this, and someone might get upset if you try.
i guess the real question here is. If I were to install the BBconnect 4.0 software on my phone; would this then allow me to access my company email on my Tytn?. The problem is that I am trying to get my company email on my Tytn without having to go to my corporate IT department and ask for official permission as they are idiots and say I do not have a need for this. Currently certain people have blackberry's in the company which they receive there email. From my point of view I could careless what they think I have a need for or dont. So in the end I am just trying to circumvent the IT department to achieve what I need. Any thoughts on how this could be done?
- Should also be noted that I have gone into my outlook settings on my Work PC; retrieved what is listed in there as the Microsoft Exchange server address and inputed this along with my netwrok id and password into my Tytn but when you do the Sync it does not work. I have also pinged the server address and inputed the IP# and tried that way unsucessfully as well ... any thoughts?
It's a pretty involved process. You will need to know the server addresss, user name and password and additionally an SSL certificate in order to get true push email. That's unless they use a big company like Verisign to provide SSL certificates. So you might have to talk to them...
First things first though.... Find out what the name of the exchange server is. You will also need a domain name. I'm sure you know what your username and password are.
NRGZ28 said:
It's a pretty involved process. You will need to know the server addresss, user name and password and additionally an SSL certificate in order to get true push email. That's unless they use a big company like Verisign to provide SSL certificates. So you might have to talk to them...
First things first though.... Find out what the name of the exchange server is. You will also need a domain name. I'm sure you know what your username and password are.
Click to expand...
Click to collapse
I have retrieved the domain name from going into the control panel and system icon and checked under computer name. So I know what the domain name is; I have also retrieved what is listed in the Microsoft Exchange Server address. However for some reason it still does not work; I am wondering if what is listed in the MES address field is only accessible if you are on the company internet and not an outside connection? - Thoughts?
If you retrieved that address from a computer on their internal network, than it's an "inside" address and it wont work on your phone. You need to figure out what the outside address is and it's pretty easy to do. It's usually "mail.blahblahcompanyname.com" or something like that.
Any thoughts on when the usual mail.blahblahcompanyname.com doesn't work? Any thoughts where one might find this information?
Yes. See above for my thoughts.
Pk2007 said:
Any thoughts on when the usual mail.blahblahcompanyname.com doesn't work? Any thoughts where one might find this information?
Click to expand...
Click to collapse
As mentioned by one of the posters above, the Outlook Web Access address is the best one to use to ensure that it is a valid routable host. You also mention that some of the other network users have blackberry devices. If your corporate IT guys are using Blackberry Enterprise Server, it may mean that Exchange Activesync is not enabled at the server end (or indeed that they are not using a late enough version of Exchange server) in which case, you will not be able to use it no matter what settings you have.
embeeowes said:
As mentioned by one of the posters above, the Outlook Web Access address is the best one to use to ensure that it is a valid routable host. You also mention that some of the other network users have blackberry devices. If your corporate IT guys are using Blackberry Enterprise Server, it may mean that Exchange Activesync is not enabled at the server end (or indeed that they are not using a late enough version of Exchange server) in which case, you will not be able to use it no matter what settings you have.
Click to expand...
Click to collapse
By Outlook Web Address; do you mean the website that you can visit to get your company email when you are away from the office?
Yes, try that address. Ours is https://blahblah.wahwah.com/exchange
If yours is also HTTPS you'll need the certificate. If it's a MAJOR provider like someone else posted, no worries, your device will handle it on its own. If it's a self-signed certificate, SOL.
pkley said:
Yes, try that address. Ours is https://blahblah.wahwah.com/exchange
If yours is also HTTPS you'll need the certificate. If it's a MAJOR provider like someone else posted, no worries, your device will handle it on its own. If it's a self-signed certificate, SOL.
Click to expand...
Click to collapse
Yeah I tried the web address that I login into my web mail when I am not in the office. However that does not seem to work either.
Thank you to all those who replied with useful information. Combined with the answers I received a little tinkering around; I was able to successfully accomplish what i was trying to do; which was receive company email without the involvement of the IT department.
computer misuse act
without sounding picky, you shouldnt be doing this unless you have explicit permission.
IT departments have specific policys in place to safeguard the data transmitted to mobile devices, and in this case, I doubt you know what these policies are and potentially opening up your corporate network for attack
all you have to do is call your IT department. Tell them you want to enable Outlook Mobile Access (OMA) on the server.
Once this is done, ask them for the Outlook Web Access (OWA) URL. Also, check to see if your server requires SSL or a domain (if you are unsure).
Once you're off the phone with IT, launch activesync on your ppc. press menu and choose "add server source"
enter your OWA address (without http:// or https://) and be sure to include " /exchange " without quotations at the end. press next. enter your outlook username. this is usually the same as your email before the @ symbol, however it can be different.
enter your password and then domain. ensure 'save password' is check. choose next
choose what you want to sync wirelessly , such as contacts, calendar, and task.
note: whatever you sync wirelessly will be deleted if you ever decide to stop using exchange activesycn
choose finish. the initial sync will begin. also, your company's security or it policy may force you to have a password on your phone. if so, you will be prompted during the initial sync to set up a password.
if you need any more help, let me know..

email exchange server question

Hi all, i have a GE account email and i would like to sync it with my phone. I kept getting the "unable to connect" message when i tried with the "email" app. Does anyone knows of any app that could allow this to happen? I ask the IT guy at work and he told me that usually Blackberry has an app to allow this to happen.
Thanks in advance
yes, go to apps -- choose the Email icon. Then it will ask you to setup new email account, after you put email address and password, click on manually manage to provide info such as pop3, exchange, etc. You will have to do it sitting to ur IT guys so you can ask him how to fill out the settings.
Are you able to use Outlook web access at your job?. If so, try that address as your mail server in the email app. Also, make sure you put your login domain in with your user name, like mydomain\myuser
Sent from my SGH-T959 using XDA App
Make sure you check the box to accept all certs as well. If your company uses a self signed SSL cert, you wont be able to connect otherwise.

Droid X OWA

I have been trying to get my work email set up on my phone. My company only supports the bb phones that they provide for certain employees. So, I am on my own to find a solution. I do have access to check my email via OWA and have been able to do so on my phone using Opera. I have read several places that I should be able to use the OWA credentials to set my email up using the default email client. But, I can't get it working. It allows me to complete the set-up without issue. But, when I try to send/receive it gives me connection error. Based on what I have read if I can login via my mobile browser I should be able to connect using the default client (i.e. IT has allowed mobile access) I am going to post what I did during the setup to see if you guys can identify what I may be doing wrong.
Domain/username: I put the username I use to login to OWA.
Password: my password
SSL is checked
Email adress: my email address
Server name: url for OWA, with https:// taken off. The address is webmail.mycompany.com
When I hit "next" it gives me an error and asks me if want to turn disable certificate verification, I hit "yes"
It then goes to the next screen which says "Success!" at the top. Then I hit "done"and setup should be complete.
But, when I go to that email and try to refresh, it says connection er
Anyone have any ideas?
Have you tried other email apps from the market? I use K-9 mail and it has been solid for IMAP. I know it supports other email systems too.
Sent from my DROIDX using XDA App
I tried one (might have been k9) and didn't have any luck. I was hoping someone had experience with a specific app. I tried Googling it, but all I could find was people recommending touchdown.

Could Company Apps Setting Be Exploited In Some Way To Sideload Homebrew Apps?

Forgive my noobness if this sounds stupid but was looking at the company apps setting on my Lumia 928 and was wondering if it could be exploited in anyway as far as sideloading homebrew? Out of curiosity, not that I expected it to work, I emailed myself a .xap file and got an error saying there was something wrong with my company app and to contact the company's support person. So went to company app settings and it asks for email,password, username,domain, and server but does it actually check the authenticity of the domain and/or server for a legitimate company or could someone simply set up a server hosting .xap files to be downloaded simply by registering and logging in with these settings? Even wondered if I simply used this info from the email server if it would install through email but seems too simple and haven't messed with it.
tonbonz said:
Forgive my noobness if this sounds stupid but was looking at the company apps setting on my Lumia 928 and was wondering if it could be exploited in anyway as far as sideloading homebrew? Out of curiosity, not that I expected it to work, I emailed myself a .xap file and got an error saying there was something wrong with my company app and to contact the company's support person. So went to company app settings and it asks for email,password, username,domain, and server but does it actually check the authenticity of the domain and/or server for a legitimate company or could someone simply set up a server hosting .xap files to be downloaded simply by registering and logging in with these settings? Even wondered if I simply used this info from the email server if it would install through email but seems too simple and haven't messed with it.
Click to expand...
Click to collapse
this would work, but theres a lot you have to do to set it up:
There are some general steps that companies must follow to establish a company account, enroll devices, and distribute apps to their enrolled devices. The following sections provide an overview of this process:
1. The company registers a company account on Windows Phone Dev Center and acquires an enterprise certificate from Symantec.
2.The company creates an application enrollment token (AET).
3.The company develops a Company Hub app.
4.The company prepares their apps for distribution.
5. Employees (or other users) enroll for company app distribution on their phones and install the company apps by using the Company Hub app.
you have to use intune director. Companys have to register with windows phone dev and aquire an enterprise cert. This *could* be a way to install homebrew apps, but it'd be easier if there was some kind of workaround.
more info here..
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206943(v=vs.105).aspx
Thanks aclegg2011 and my apologies to the Forum Administrator as I just saw a similar post in a different section.

Categories

Resources