2

I am trying to add OAuth athentication with to access YouTube, but how do I add localhost as domain?

For example on domain registration page here, I want to use localhost, since I am developing this application locally.

Please help me or suggest me alternative ways

Thank you

P.S. I also added this question on https://webapps.stackexchange.com/, but not sure about community activity there so please ignore

2 Answers 2

2

Obviously you can't register 'localhost' for authentication since it is merely an alias. If you want to use OAuth with any Google service, you'll have to have a domain. If you're developing a desktop app, there is a workaround (this may actually work for all but I didn't try):

You can actually sign your OAuth requests without registering your domain with Google by creating a signature using HMAC-SHA1, a consumer key of "anonymous" and a consumer secret of "anonymous". Just make sure you have the appropriate signature base string for your requests.

http://code.google.com/apis/accounts/docs/OAuth_ref.html#SigningOAuth

Sign up to request clarification or add additional context in comments.

Comments

0

On the page in Google's APIs console where you provide redirect URIs for your app, you can use localhost. Or you can give another name to localhost in your /etc/hosts file like this:

127.0.0.1       localhost myname.madeupdomain.net

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.