auth2 sign-in

30 views
Skip to first unread message

Charles Libicki

unread,
Jul 6, 2017, 1:17:31 AM7/6/17
to Angular and AngularJS discussion
I am trying to add a login component to the Heroes tutorial, using Google Sign-in. The call auth2.signIn works properly as far as pulling in the correct information, but the page is erased and fails to rebuild properly afterwards. I suspect that the sign-in popup does not play well with Angular, so I tried using the redirect option instead. in that case I get a 404 error, redirect_uri_mismatch, even though the reported URI and the URI in the authorized list match letter for letter. And I don't get a 400 error without the redirect option.
Any suggestions on how to proceed?

Charles Libicki

unread,
Jul 6, 2017, 1:29:35 AM7/6/17
to Angular and AngularJS discussion
Correction: The error is 400, not 404.

Lucas Lacroix

unread,
Jul 6, 2017, 7:59:16 AM7/6/17
to Angular and AngularJS discussion
Your redirect URI must be the entire thing, ex. "https://example.org/oauth2".

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
--
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH

Charles Libicki

unread,
Jul 6, 2017, 8:24:41 AM7/6/17
to ang...@googlegroups.com
I would prefer to go with the pop-up if it would work properly. But with the redirect, what I do is fetch the current URI, in this case, http://localhost:8080/login and then strip out the /login part, and send http://localhost:8080, which is exactly what is in the authorized redirect list. Should I instead add http://localhost:8080/login to the list?

On Thu, Jul 6, 2017 at 2:57 PM, 'Lucas Lacroix' via Angular and AngularJS discussion <ang...@googlegroups.com> wrote:
Your redirect URI must be the entire thing, ex. "https://example.org/oauth2".

On Thu, Jul 6, 2017 at 1:29 AM Charles Libicki <clib...@gmail.com> wrote:
Correction: The error is 400, not 404.


On Thursday, July 6, 2017 at 8:17:31 AM UTC+3, Charles Libicki wrote:
I am trying to add a login component to the Heroes tutorial, using Google Sign-in. The call auth2.signIn works properly as far as pulling in the correct information, but the page is erased and fails to rebuild properly afterwards. I suspect that the sign-in popup does not play well with Angular, so I tried using the redirect option instead. in that case I get a 404 error, redirect_uri_mismatch, even though the reported URI and the URI in the authorized list match letter for letter. And I don't get a 400 error without the redirect option.
Any suggestions on how to proceed?

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
--
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH

--
You received this message because you are subscribed to a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/WZtZJY1NZiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+unsubscribe@googlegroups.com.

Lucas Lacroix

unread,
Jul 6, 2017, 8:35:23 AM7/6/17
to ang...@googlegroups.com

I do not believe you can use http with Google's oauth implementation. I believe it must be https or the request will be rejected.


On Thu, Jul 6, 2017, 08:24 Charles Libicki <clib...@gmail.com> wrote:
I would prefer to go with the pop-up if it would work properly. But with the redirect, what I do is fetch the current URI, in this case, http://localhost:8080/login and then strip out the /login part, and send http://localhost:8080, which is exactly what is in the authorized redirect list. Should I instead add http://localhost:8080/login to the list?

On Thu, Jul 6, 2017 at 2:57 PM, 'Lucas Lacroix' via Angular and AngularJS discussion <ang...@googlegroups.com> wrote:
Your redirect URI must be the entire thing, ex. "https://example.org/oauth2".

On Thu, Jul 6, 2017 at 1:29 AM Charles Libicki <clib...@gmail.com> wrote:
Correction: The error is 400, not 404.


On Thursday, July 6, 2017 at 8:17:31 AM UTC+3, Charles Libicki wrote:
I am trying to add a login component to the Heroes tutorial, using Google Sign-in. The call auth2.signIn works properly as far as pulling in the correct information, but the page is erased and fails to rebuild properly afterwards. I suspect that the sign-in popup does not play well with Angular, so I tried using the redirect option instead. in that case I get a 404 error, redirect_uri_mismatch, even though the reported URI and the URI in the authorized list match letter for letter. And I don't get a 400 error without the redirect option.
Any suggestions on how to proceed?

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
--
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH

--
You received this message because you are subscribed to a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/WZtZJY1NZiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Charles Libicki

unread,
Jul 6, 2017, 8:40:35 AM7/6/17
to ang...@googlegroups.com
Well, with the popup it completely works; I get the results I expect. It's just the UI is screwed up. And I tried adding http://localhost:8080/login to the list of authorized origins, but the /login part is rejected. The credentials manager wants origins only, not sub-directories.

On Thu, Jul 6, 2017 at 3:34 PM, 'Lucas Lacroix' via Angular and AngularJS discussion <ang...@googlegroups.com> wrote:

I do not believe you can use http with Google's oauth implementation. I believe it must be https or the request will be rejected.

On Thu, Jul 6, 2017, 08:24 Charles Libicki <clib...@gmail.com> wrote:
I would prefer to go with the pop-up if it would work properly. But with the redirect, what I do is fetch the current URI, in this case, http://localhost:8080/login and then strip out the /login part, and send http://localhost:8080, which is exactly what is in the authorized redirect list. Should I instead add http://localhost:8080/login to the list?

On Thu, Jul 6, 2017 at 2:57 PM, 'Lucas Lacroix' via Angular and AngularJS discussion <ang...@googlegroups.com> wrote:
Your redirect URI must be the entire thing, ex. "https://example.org/oauth2".

On Thu, Jul 6, 2017 at 1:29 AM Charles Libicki <clib...@gmail.com> wrote:
Correction: The error is 400, not 404.


On Thursday, July 6, 2017 at 8:17:31 AM UTC+3, Charles Libicki wrote:
I am trying to add a login component to the Heroes tutorial, using Google Sign-in. The call auth2.signIn works properly as far as pulling in the correct information, but the page is erased and fails to rebuild properly afterwards. I suspect that the sign-in popup does not play well with Angular, so I tried using the redirect option instead. in that case I get a 404 error, redirect_uri_mismatch, even though the reported URI and the URI in the authorized list match letter for letter. And I don't get a 400 error without the redirect option.
Any suggestions on how to proceed?

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
--
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH

--
You received this message because you are subscribed to a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/WZtZJY1NZiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+unsubscribe@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
--
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH

--
You received this message because you are subscribed to a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/WZtZJY1NZiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+unsubscribe@googlegroups.com.

Lucas Lacroix

unread,
Jul 6, 2017, 8:43:14 AM7/6/17
to ang...@googlegroups.com
You do not need the "authorized origins". That's an extra security layer and is optional.

AFAIK, your redirect URI must be HTTPS.

If you want someone on this forum to assist in debugging your display issue(s) with the pop-up, then please reproduce in a Plunker.

On Thu, Jul 6, 2017 at 8:40 AM Charles Libicki <clib...@gmail.com> wrote:
Well, with the popup it completely works; I get the results I expect. It's just the UI is screwed up. And I tried adding http://localhost:8080/login to the list of authorized origins, but the /login part is rejected. The credentials manager wants origins only, not sub-directories.
On Thu, Jul 6, 2017 at 3:34 PM, 'Lucas Lacroix' via Angular and AngularJS discussion <ang...@googlegroups.com> wrote:

I do not believe you can use http with Google's oauth implementation. I believe it must be https or the request will be rejected.

On Thu, Jul 6, 2017, 08:24 Charles Libicki <clib...@gmail.com> wrote:
I would prefer to go with the pop-up if it would work properly. But with the redirect, what I do is fetch the current URI, in this case, http://localhost:8080/login and then strip out the /login part, and send http://localhost:8080, which is exactly what is in the authorized redirect list. Should I instead add http://localhost:8080/login to the list?

On Thu, Jul 6, 2017 at 2:57 PM, 'Lucas Lacroix' via Angular and AngularJS discussion <ang...@googlegroups.com> wrote:
Your redirect URI must be the entire thing, ex. "https://example.org/oauth2".

On Thu, Jul 6, 2017 at 1:29 AM Charles Libicki <clib...@gmail.com> wrote:
Correction: The error is 400, not 404.


On Thursday, July 6, 2017 at 8:17:31 AM UTC+3, Charles Libicki wrote:
I am trying to add a login component to the Heroes tutorial, using Google Sign-in. The call auth2.signIn works properly as far as pulling in the correct information, but the page is erased and fails to rebuild properly afterwards. I suspect that the sign-in popup does not play well with Angular, so I tried using the redirect option instead. in that case I get a 404 error, redirect_uri_mismatch, even though the reported URI and the URI in the authorized list match letter for letter. And I don't get a 400 error without the redirect option.
Any suggestions on how to proceed?

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
--
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH

--
You received this message because you are subscribed to a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/WZtZJY1NZiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
--
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH

--
You received this message because you are subscribed to a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/WZtZJY1NZiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Charles Libicki

unread,
Jul 9, 2017, 11:59:37 AM7/9/17
to ang...@googlegroups.com
OK. I got it. I added an ngzone.runOutsideAngular wrapper around the auth2.signIn call.  It still blanks the screen, but at least the screen rebuilds properly afterwards. Thanks for your help.

On Thu, Jul 6, 2017 at 3:42 PM, 'Lucas Lacroix' via Angular and AngularJS discussion <ang...@googlegroups.com> wrote:
You do not need the "authorized origins". That's an extra security layer and is optional.

AFAIK, your redirect URI must be HTTPS.

If you want someone on this forum to assist in debugging your display issue(s) with the pop-up, then please reproduce in a Plunker.
On Thu, Jul 6, 2017 at 8:40 AM Charles Libicki <clib...@gmail.com> wrote:
Well, with the popup it completely works; I get the results I expect. It's just the UI is screwed up. And I tried adding http://localhost:8080/login to the list of authorized origins, but the /login part is rejected. The credentials manager wants origins only, not sub-directories.
On Thu, Jul 6, 2017 at 3:34 PM, 'Lucas Lacroix' via Angular and AngularJS discussion <ang...@googlegroups.com> wrote:

I do not believe you can use http with Google's oauth implementation. I believe it must be https or the request will be rejected.

On Thu, Jul 6, 2017, 08:24 Charles Libicki <clib...@gmail.com> wrote:
I would prefer to go with the pop-up if it would work properly. But with the redirect, what I do is fetch the current URI, in this case, http://localhost:8080/login and then strip out the /login part, and send http://localhost:8080, which is exactly what is in the authorized redirect list. Should I instead add http://localhost:8080/login to the list?

On Thu, Jul 6, 2017 at 2:57 PM, 'Lucas Lacroix' via Angular and AngularJS discussion <ang...@googlegroups.com> wrote:
Your redirect URI must be the entire thing, ex. "https://example.org/oauth2".

On Thu, Jul 6, 2017 at 1:29 AM Charles Libicki <clib...@gmail.com> wrote:
Correction: The error is 400, not 404.


On Thursday, July 6, 2017 at 8:17:31 AM UTC+3, Charles Libicki wrote:
I am trying to add a login component to the Heroes tutorial, using Google Sign-in. The call auth2.signIn works properly as far as pulling in the correct information, but the page is erased and fails to rebuild properly afterwards. I suspect that the sign-in popup does not play well with Angular, so I tried using the redirect option instead. in that case I get a 404 error, redirect_uri_mismatch, even though the reported URI and the URI in the authorized list match letter for letter. And I don't get a 400 error without the redirect option.
Any suggestions on how to proceed?

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
--
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH

--
You received this message because you are subscribed to a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/WZtZJY1NZiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+unsubscribe@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
--
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH

--
You received this message because you are subscribed to a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/WZtZJY1NZiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+unsubscribe@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
--
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH

--
You received this message because you are subscribed to a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/WZtZJY1NZiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages