What is the difference between Google OAuth authorization URLs











up vote
1
down vote

favorite












Question: What is the difference between the following OAuth 2.0 authorization URLs:



In various documents example I see reference to this authorization URL:



https://accounts.google.com/o/oauth2/auth


In other documents example I see reference to this authorization URL:



https://accounts.google.com/o/oauth2/v2/auth


These URLs are used for code like this (Python):



authorization_base_url is one of the above URLs.



authorization_url, state = gcp.authorization_url(
authorization_base_url,
access_type="offline",
prompt="select_account",
include_granted_scopes='true')


I am in the process of debugging another Google OAuth 2.0 Refresh Token problem and I am trying to clarify the exact solution link. I am seeing behaviour that does not match documentation.










share|improve this question






















  • If you want the most updated one you should check accounts.google.com/.well-known/openid-configuration however. The one in that does not work with all the client libraries in my experience. I sent an email off to the Google Oauth team with luck they will respond to your question.
    – DaImTo
    Nov 19 at 8:39










  • @DaImTo - Thank you. Also mention to the Google team that they should add https://www.googleapis.com/oauth2/v3/tokeninfo to openid-configuration. I am curious why that endpoint is left out of that document.
    – John Hanley
    Nov 19 at 14:42










  • I emailed them about this a few months ago when the added the one thats in the discovery doc now. I have yet to get a concrete answer back
    – DaImTo
    Nov 19 at 14:58















up vote
1
down vote

favorite












Question: What is the difference between the following OAuth 2.0 authorization URLs:



In various documents example I see reference to this authorization URL:



https://accounts.google.com/o/oauth2/auth


In other documents example I see reference to this authorization URL:



https://accounts.google.com/o/oauth2/v2/auth


These URLs are used for code like this (Python):



authorization_base_url is one of the above URLs.



authorization_url, state = gcp.authorization_url(
authorization_base_url,
access_type="offline",
prompt="select_account",
include_granted_scopes='true')


I am in the process of debugging another Google OAuth 2.0 Refresh Token problem and I am trying to clarify the exact solution link. I am seeing behaviour that does not match documentation.










share|improve this question






















  • If you want the most updated one you should check accounts.google.com/.well-known/openid-configuration however. The one in that does not work with all the client libraries in my experience. I sent an email off to the Google Oauth team with luck they will respond to your question.
    – DaImTo
    Nov 19 at 8:39










  • @DaImTo - Thank you. Also mention to the Google team that they should add https://www.googleapis.com/oauth2/v3/tokeninfo to openid-configuration. I am curious why that endpoint is left out of that document.
    – John Hanley
    Nov 19 at 14:42










  • I emailed them about this a few months ago when the added the one thats in the discovery doc now. I have yet to get a concrete answer back
    – DaImTo
    Nov 19 at 14:58













up vote
1
down vote

favorite









up vote
1
down vote

favorite











Question: What is the difference between the following OAuth 2.0 authorization URLs:



In various documents example I see reference to this authorization URL:



https://accounts.google.com/o/oauth2/auth


In other documents example I see reference to this authorization URL:



https://accounts.google.com/o/oauth2/v2/auth


These URLs are used for code like this (Python):



authorization_base_url is one of the above URLs.



authorization_url, state = gcp.authorization_url(
authorization_base_url,
access_type="offline",
prompt="select_account",
include_granted_scopes='true')


I am in the process of debugging another Google OAuth 2.0 Refresh Token problem and I am trying to clarify the exact solution link. I am seeing behaviour that does not match documentation.










share|improve this question













Question: What is the difference between the following OAuth 2.0 authorization URLs:



In various documents example I see reference to this authorization URL:



https://accounts.google.com/o/oauth2/auth


In other documents example I see reference to this authorization URL:



https://accounts.google.com/o/oauth2/v2/auth


These URLs are used for code like this (Python):



authorization_base_url is one of the above URLs.



authorization_url, state = gcp.authorization_url(
authorization_base_url,
access_type="offline",
prompt="select_account",
include_granted_scopes='true')


I am in the process of debugging another Google OAuth 2.0 Refresh Token problem and I am trying to clarify the exact solution link. I am seeing behaviour that does not match documentation.







oauth-2.0 google-cloud-platform google-oauth google-openid






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 at 7:42









John Hanley

11.4k2527




11.4k2527












  • If you want the most updated one you should check accounts.google.com/.well-known/openid-configuration however. The one in that does not work with all the client libraries in my experience. I sent an email off to the Google Oauth team with luck they will respond to your question.
    – DaImTo
    Nov 19 at 8:39










  • @DaImTo - Thank you. Also mention to the Google team that they should add https://www.googleapis.com/oauth2/v3/tokeninfo to openid-configuration. I am curious why that endpoint is left out of that document.
    – John Hanley
    Nov 19 at 14:42










  • I emailed them about this a few months ago when the added the one thats in the discovery doc now. I have yet to get a concrete answer back
    – DaImTo
    Nov 19 at 14:58


















  • If you want the most updated one you should check accounts.google.com/.well-known/openid-configuration however. The one in that does not work with all the client libraries in my experience. I sent an email off to the Google Oauth team with luck they will respond to your question.
    – DaImTo
    Nov 19 at 8:39










  • @DaImTo - Thank you. Also mention to the Google team that they should add https://www.googleapis.com/oauth2/v3/tokeninfo to openid-configuration. I am curious why that endpoint is left out of that document.
    – John Hanley
    Nov 19 at 14:42










  • I emailed them about this a few months ago when the added the one thats in the discovery doc now. I have yet to get a concrete answer back
    – DaImTo
    Nov 19 at 14:58
















If you want the most updated one you should check accounts.google.com/.well-known/openid-configuration however. The one in that does not work with all the client libraries in my experience. I sent an email off to the Google Oauth team with luck they will respond to your question.
– DaImTo
Nov 19 at 8:39




If you want the most updated one you should check accounts.google.com/.well-known/openid-configuration however. The one in that does not work with all the client libraries in my experience. I sent an email off to the Google Oauth team with luck they will respond to your question.
– DaImTo
Nov 19 at 8:39












@DaImTo - Thank you. Also mention to the Google team that they should add https://www.googleapis.com/oauth2/v3/tokeninfo to openid-configuration. I am curious why that endpoint is left out of that document.
– John Hanley
Nov 19 at 14:42




@DaImTo - Thank you. Also mention to the Google team that they should add https://www.googleapis.com/oauth2/v3/tokeninfo to openid-configuration. I am curious why that endpoint is left out of that document.
– John Hanley
Nov 19 at 14:42












I emailed them about this a few months ago when the added the one thats in the discovery doc now. I have yet to get a concrete answer back
– DaImTo
Nov 19 at 14:58




I emailed them about this a few months ago when the added the one thats in the discovery doc now. I have yet to get a concrete answer back
– DaImTo
Nov 19 at 14:58












1 Answer
1






active

oldest

votes

















up vote
0
down vote













There's no documentation of the differences but in general they are different versions of the same endpoint.



A newer version may introduce improved or changed behavior though protocol-wise and interoperability-wise there should be no difference to the consumer. They're all OAuth 2.0/OIDC compliant but within the spec there are different optional behaviours that may be implemented.



As an example of that: when an error occurs on the Google side, Google may decide to stop the flow and show this error to the user, or alternatively return an error to the Client as OAuth 2.0 allows you to do. Both are valid behaviors and different versions of the Authorization endpoint may implement a different flavor.






share|improve this answer





















  • Thank you. It is the exact behaviour that I am having trouble with. In the other question that I referenced, I am receiving a Refresh Token for my implementation in localhost mode. When I deployed to a public server, I stopped receiving Refresh Tokens. I am now looking for details to figure this out.
    – John Hanley
    Nov 19 at 14:38










  • I think that's two questions
    – Hans Z.
    Nov 19 at 15:02










  • I don't understand what your comment means.
    – John Hanley
    Nov 19 at 15:04











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53370265%2fwhat-is-the-difference-between-google-oauth-authorization-urls%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













There's no documentation of the differences but in general they are different versions of the same endpoint.



A newer version may introduce improved or changed behavior though protocol-wise and interoperability-wise there should be no difference to the consumer. They're all OAuth 2.0/OIDC compliant but within the spec there are different optional behaviours that may be implemented.



As an example of that: when an error occurs on the Google side, Google may decide to stop the flow and show this error to the user, or alternatively return an error to the Client as OAuth 2.0 allows you to do. Both are valid behaviors and different versions of the Authorization endpoint may implement a different flavor.






share|improve this answer





















  • Thank you. It is the exact behaviour that I am having trouble with. In the other question that I referenced, I am receiving a Refresh Token for my implementation in localhost mode. When I deployed to a public server, I stopped receiving Refresh Tokens. I am now looking for details to figure this out.
    – John Hanley
    Nov 19 at 14:38










  • I think that's two questions
    – Hans Z.
    Nov 19 at 15:02










  • I don't understand what your comment means.
    – John Hanley
    Nov 19 at 15:04















up vote
0
down vote













There's no documentation of the differences but in general they are different versions of the same endpoint.



A newer version may introduce improved or changed behavior though protocol-wise and interoperability-wise there should be no difference to the consumer. They're all OAuth 2.0/OIDC compliant but within the spec there are different optional behaviours that may be implemented.



As an example of that: when an error occurs on the Google side, Google may decide to stop the flow and show this error to the user, or alternatively return an error to the Client as OAuth 2.0 allows you to do. Both are valid behaviors and different versions of the Authorization endpoint may implement a different flavor.






share|improve this answer





















  • Thank you. It is the exact behaviour that I am having trouble with. In the other question that I referenced, I am receiving a Refresh Token for my implementation in localhost mode. When I deployed to a public server, I stopped receiving Refresh Tokens. I am now looking for details to figure this out.
    – John Hanley
    Nov 19 at 14:38










  • I think that's two questions
    – Hans Z.
    Nov 19 at 15:02










  • I don't understand what your comment means.
    – John Hanley
    Nov 19 at 15:04













up vote
0
down vote










up vote
0
down vote









There's no documentation of the differences but in general they are different versions of the same endpoint.



A newer version may introduce improved or changed behavior though protocol-wise and interoperability-wise there should be no difference to the consumer. They're all OAuth 2.0/OIDC compliant but within the spec there are different optional behaviours that may be implemented.



As an example of that: when an error occurs on the Google side, Google may decide to stop the flow and show this error to the user, or alternatively return an error to the Client as OAuth 2.0 allows you to do. Both are valid behaviors and different versions of the Authorization endpoint may implement a different flavor.






share|improve this answer












There's no documentation of the differences but in general they are different versions of the same endpoint.



A newer version may introduce improved or changed behavior though protocol-wise and interoperability-wise there should be no difference to the consumer. They're all OAuth 2.0/OIDC compliant but within the spec there are different optional behaviours that may be implemented.



As an example of that: when an error occurs on the Google side, Google may decide to stop the flow and show this error to the user, or alternatively return an error to the Client as OAuth 2.0 allows you to do. Both are valid behaviors and different versions of the Authorization endpoint may implement a different flavor.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 19 at 9:44









Hans Z.

27.4k75280




27.4k75280












  • Thank you. It is the exact behaviour that I am having trouble with. In the other question that I referenced, I am receiving a Refresh Token for my implementation in localhost mode. When I deployed to a public server, I stopped receiving Refresh Tokens. I am now looking for details to figure this out.
    – John Hanley
    Nov 19 at 14:38










  • I think that's two questions
    – Hans Z.
    Nov 19 at 15:02










  • I don't understand what your comment means.
    – John Hanley
    Nov 19 at 15:04


















  • Thank you. It is the exact behaviour that I am having trouble with. In the other question that I referenced, I am receiving a Refresh Token for my implementation in localhost mode. When I deployed to a public server, I stopped receiving Refresh Tokens. I am now looking for details to figure this out.
    – John Hanley
    Nov 19 at 14:38










  • I think that's two questions
    – Hans Z.
    Nov 19 at 15:02










  • I don't understand what your comment means.
    – John Hanley
    Nov 19 at 15:04
















Thank you. It is the exact behaviour that I am having trouble with. In the other question that I referenced, I am receiving a Refresh Token for my implementation in localhost mode. When I deployed to a public server, I stopped receiving Refresh Tokens. I am now looking for details to figure this out.
– John Hanley
Nov 19 at 14:38




Thank you. It is the exact behaviour that I am having trouble with. In the other question that I referenced, I am receiving a Refresh Token for my implementation in localhost mode. When I deployed to a public server, I stopped receiving Refresh Tokens. I am now looking for details to figure this out.
– John Hanley
Nov 19 at 14:38












I think that's two questions
– Hans Z.
Nov 19 at 15:02




I think that's two questions
– Hans Z.
Nov 19 at 15:02












I don't understand what your comment means.
– John Hanley
Nov 19 at 15:04




I don't understand what your comment means.
– John Hanley
Nov 19 at 15:04


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53370265%2fwhat-is-the-difference-between-google-oauth-authorization-urls%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

Alcedinidae

Origin of the phrase “under your belt”?