This project has moved and is read-only. For the latest updates, please go here.

A way to authenticate without redirecting?

Topics: Developer Forum, Project Management Forum, User Forum
Jun 12, 2007 at 3:54 AM
Is there a way to authenticate and receive a frob (generate a token) without redirecting to the flickr Website? I've created a few test pages and they all at some point need to be redirected to the flickr Website to authenticate. It makes me log in with my Yahoo ID and password, then redirects me back to my page with the frob parameter in the query string.

Is there a way to authenticate a token without redirecting to the flicker Website via flickr.AuthCalcWebUrl?

When I log into my flickr account (via the browser) and click on the 'third party applications' tab, I can see that I have granted read and write access to the app. Is there a permanent "Frob" that I can obtain so I don't have to play the redirect game?

Any suggestions would be greatly appreciated.

string frob = Request.Params"frob";
if (String.IsNullOrEmpty(frob))
Flickr flickr = new Flickr(apiKey, sharedSecret);
string url = flickr.AuthCalcWebUrl(AuthLevel.Write);
Flickr flickr = new Flickr(apiKey, sharedSecret);
Auth auth = flickr.AuthGetToken(frob);
flickr.AuthToken = auth.Token;
Jun 12, 2007 at 10:11 AM
The 'permanent frob' you talk about is the authentication token. Just store the auth.Token value (in a cookie, session variable, database table, wherever), and use that next time. No need to redirect every time.
Jun 13, 2007 at 1:06 PM
Thanks so much. That resolved the issue.