[GH-ISSUE #534] Please add log for request/response like p2/oauth2 library #352

Closed
opened 2026-03-03 16:47:59 +03:00 by kerem · 8 comments
Owner

Originally created by @iam-manikandan on GitHub (Jul 9, 2019).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/534

Feature request

1 ) Is this library have any logging solution like p2/oauth2 library?
2) Please make client secret as optional in oauth2swift class because some of oauth2 provider doesn't need client secret in the request.

Please concentrate on logging the request/response details, that will be really good. Thanks

Originally created by @iam-manikandan on GitHub (Jul 9, 2019). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/534 **Feature request** 1 ) Is this library have any logging solution like p2/oauth2 library? 2) Please make client secret as optional in oauth2swift class because some of oauth2 provider doesn't need client secret in the request. Please concentrate on logging the request/response details, that will be really good. Thanks
kerem closed this issue 2026-03-03 16:47:59 +03:00
Author
Owner

@phimage commented on GitHub (Jul 9, 2019):

1/ I will not study another library, please describe the eventual missing feature
2/ There is a github template for issue. This is important to not loose time. Here I need to ask a question that is already asked.. the oauth provider?

<!-- gh-comment-id:509652100 --> @phimage commented on GitHub (Jul 9, 2019): 1/ I will not study another library, please describe the eventual missing feature 2/ There is a github template for issue. This is important to not loose time. Here I need to ask a question that is already asked.. the oauth provider?
Author
Owner

@iam-manikandan commented on GitHub (Jul 9, 2019):

  1. I have been working on integrating the cloud storages (drive,box,dropbox) in my app, for that I have went through libraries that handle all accounts authentication and authorization and I have found yours and p2/oauth2. Initially I have chosen yours for my app but really tedious to find what's happening in the request/response flow and debug the errors. p2/oauth2 has logging property, so we can enable/disable the logging.

  2. Google drive doesn't need client secret for authorize and getting access token, thats what i asked to make that client secret parameter as optional.

Sorry for mentioning other libraries here, I have just saying what I felt.

<!-- gh-comment-id:509673153 --> @iam-manikandan commented on GitHub (Jul 9, 2019): 1) I have been working on integrating the cloud storages (drive,box,dropbox) in my app, for that I have went through libraries that handle all accounts authentication and authorization and I have found yours and p2/oauth2. Initially I have chosen yours for my app but really tedious to find what's happening in the request/response flow and debug the errors. p2/oauth2 has logging property, so we can enable/disable the logging. 2) Google drive doesn't need client secret for authorize and getting access token, thats what i asked to make that client secret parameter as optional. Sorry for mentioning other libraries here, I have just saying what I felt.
Author
Owner

@slizeray commented on GitHub (Jul 9, 2019):

you can use an empty string for the client secret...I agree nil would be better though....But an empty string works fine.

<!-- gh-comment-id:509674612 --> @slizeray commented on GitHub (Jul 9, 2019): you can use an empty string for the client secret...I agree nil would be better though....But an empty string works fine.
Author
Owner

@iam-manikandan commented on GitHub (Jul 9, 2019):

Yes I tried empty string,but I had some issue. Will try again and let you know. Thanks

<!-- gh-comment-id:509676850 --> @iam-manikandan commented on GitHub (Jul 9, 2019): Yes I tried empty string,but I had some issue. Will try again and let you know. Thanks
Author
Owner

@slizeray commented on GitHub (Jul 9, 2019):

FYI, I integrate with Google Drive using OAuthSwift....

<!-- gh-comment-id:509677222 --> @slizeray commented on GitHub (Jul 9, 2019): FYI, I integrate with Google Drive using OAuthSwift....
Author
Owner

@svoip commented on GitHub (Apr 10, 2020):

I agree with the thread author on having a logging solution for this library would be great.
For example, under a logging flag, the library adds more print statements, in all or most of the flows (be it a presentation/dismiss of Safari, or network request or encoding, etc).
Can I participate in adding such a feature?

<!-- gh-comment-id:611949697 --> @svoip commented on GitHub (Apr 10, 2020): I agree with the thread author on having a logging solution for this library would be great. For example, under a logging flag, the library adds more print statements, in all or most of the flows (be it a presentation/dismiss of Safari, or network request or encoding, etc). Can I participate in adding such a feature?
Author
Owner

@phimage commented on GitHub (Apr 10, 2020):

@svoip yes you can PR

instead of printing directly, better implementation will be to have a protocol to log, replacable with debug, error, warning log level

<!-- gh-comment-id:611963409 --> @phimage commented on GitHub (Apr 10, 2020): @svoip yes you can PR instead of printing directly, better implementation will be to have a protocol to log, replacable with debug, error, warning log level
Author
Owner

@svoip commented on GitHub (Apr 22, 2020):

@phimage I have created pull request
https://github.com/OAuthSwift/OAuthSwift/pull/586
Could you review it please?

<!-- gh-comment-id:617688757 --> @svoip commented on GitHub (Apr 22, 2020): @phimage I have created pull request https://github.com/OAuthSwift/OAuthSwift/pull/586 Could you review it please?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#352
No description provided.