mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #395] How to hide consumer_secret in app? #251
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#251
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @trondkr on GitHub (Jul 21, 2017).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/395
Description:
How to hide consumer_secret in app?
OAuth Provider (Twitter, Github, ..):
Twitter, Google...
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
[x ] 8.0 (Swift 3.0)
8.0 (Swift 2.3)
7.3.1
other: (Please fill in the version you are using.)
objective c
I understand that my question is not an issue but I still hope you can bear with me. I can not figure out how most people hide their consumer_secret (for Twitter, Google etc.) in an app (macos, iOS)? I have asked a question on SO without any answers and I was hoping the OAuthSwift community might help. Do developers ship the Twitter, Google, etc. consumer_secret as a string or obfuscated string in their apps these days or is there a trick to this? I understand that storing the secret on a server may be the best, but using Swift I don't see how even that can be done securely as I would still have to retrieve the secret and add it to my OAuthSwift request which could then be intercepted and discovered. Any suggestions are very appreciated. Thank you. T
@phimage commented on GitHub (Jul 21, 2017):
say how I do it could help someone to find how he can revert it but I will take the risk
I use crypto swift to encode it and keep in my code only this encrypted value and the key to decrypt
So the problem is reported to this two elements, If someone find the key, the crypted value and the method used, he can decrypt it, but this add so much fun for the hacker
You can the split this values in multiple variables in different files, reverse it, add multiple encryptions etc...
@trondkr commented on GitHub (Jul 22, 2017):
It seems like this is the approach I will take myself. I am surprised it is so difficult to find information about beast approaches for this, but perhaps developers want their solution hidden as much as possible. I appreciate you taking the time to answer. Thanks. T