views:

87

answers:

1

I am using google calendar API to sync google calendar with our custom calendar. Right now I am trying it with a crude way by asking user if he/she wants to sync their calendar with google or not. If they say "yes" , I show them login screen where they have to enter their google user id and password and the calendar will be synced. But now when I change the month , the screen gets refreshed and all login information is lost and that changed month doesn't show up the events from google calendar.

What is a best way for authentication AuthSub, OAuth or the crude way I mentioned for testing locally? I really don't know if I can use OAuth locally.

+1  A: 

Never, ever require your user to enter credentials from other site into yours.

That's why protocols like OAuth were created, and they are meant to be used.

Pablo Fernandez
well, before making my application live, I want to test it locally. OAuth needs to register the domain. How do I handle that?
yogsma
You actually want a local OAuth server just for testing?
Pablo Fernandez