Closed GoogleCodeExporter closed 9 years ago
Please refer to demo application's save/load token demo. It demonstrates show
can you download a token on disk and later use that to auto-login. In your case
instead of writing to disk it will be saving to database. I've coped some
snippet from the demo page to give you a kick start
var token = SocialAuthUser.GetCurrentUser().GetConnection((PROVIDER_TYPE)Enum.Parse(typeof(PROVIDER_TYPE), ddlConnectedProviders.SelectedItem.Value)).GetConnectionToken();
IFormatter formatter = new BinaryFormatter();
Stream stream = new FileStream(Server.MapPath("~/temptokens/MyFile.token"),
FileMode.Create,
FileAccess.Write, FileShare.Write);
formatter.Serialize(stream, token);
stream.Close();
stream.Dispose();
Response.ClearHeaders();
Response.ClearContent();
Response.AddHeader("Content-Disposition", String.Format("attachment; filename={0}", "MyFile.token"));
Response.WriteFile("~/temptokens/MyFile.token");
Deepak
Original comment by daggar...@brickred.com
on 21 Sep 2012 at 8:51
Original issue reported on code.google.com by
matthewb...@gmail.com
on 18 Sep 2012 at 3:42