Re: Issue 6: Create an ASP.Net MVC Sample (issue 194980043 by jmcgrew@google.com)

13 views
Skip to first unread message

pel...@google.com

unread,
Apr 8, 2015, 9:36:20 AM4/8/15
to jmc...@google.com, cl...@google.com, google-api-d...@googlegroups.com, re...@codereview-hr.appspotmail.com
Sorry it takes forever :)
Just I still didn't get if the client library can already store your
credential (like we discussed offline).

Besides that LGTM

Can you also attach some screenshots of screen to CL description?

Thanks!



https://codereview.appspot.com/194980043/diff/30001/Calendar.ASP.NET.MVC5/App_Start/IdentityConfig.cs
File Calendar.ASP.NET.MVC5/App_Start/IdentityConfig.cs (right):

https://codereview.appspot.com/194980043/diff/30001/Calendar.ASP.NET.MVC5/App_Start/IdentityConfig.cs#newcode103
Calendar.ASP.NET.MVC5/App_Start/IdentityConfig.cs:103: var
googleRefreshToken =
externalIdentity.FindFirst(MyClaimTypes.GoogleRefreshToken);
On 2015/04/06 23:01:52, jmcgrew wrote:
> On 2015/03/07 00:17:43, peleyal wrote:
> > Why do we need to save the access and refresh token here? They
should be
> stored
> > in the auth library (using the data store)? It looks like I'm
missing
> something

> These tokens are returned in the OAuth login response to the MVC
third-party
> login provider. At Startup.Auth.cs:86, we copy them into a temporary
identity,
> and then here we copy them from the temporary identity to the real
identity
> where they'll be stored alongside the rest of the user's MVC profile.
Is there
> an advantage to storing them in the API client's data store instead?

It just that the client library already stored all those values (except
user id) for you, so why do we need to store them in two different
places?

https://codereview.appspot.com/194980043/
Reply all
Reply to author
Forward
0 new messages