firebase / firebase/firebase-ios-sdk
FR: Twitter sign in button support for macOS
- Dominant language
- C++
- Stars
- 6.7k
- Forks
- 1.8k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### [REQUIRED] Step 1: Describe your environment
* Xcode version: _12.2____
* Firebase SDK version: _7.2____
* Installation method: `CocoaPods
* Firebase Component: __Auth___ (Auth, Core, Database, Firestore, Messaging, Storage, etc)
### [REQUIRED] Step 2: Describe the problem
MacOS via SwiftUI:
following the documentation to setup the twitter sign in button Im getting an error
" Value of type 'OAuthProvider' has no member 'getCredentialWith' "
#### Steps to reproduce:
build a SwiftUI app for macOS
add pods:
```
pod 'Firebase/Auth', '~> 7.2-M1'
pod 'Firebase/Firestore', '~> 7.2-M1'
#pod 'Firebase/Analytics', '~> 7.2-M1'
pod 'Firebase/Storage', '~> 7.2-M1'
pod 'Firebase/Functions', '~> 7.2-M1'
pod 'Firebase/DynamicLinks', '~> 7.2-M1'
pod 'Firebase/Messaging', '~> 7.2-M1'
pod 'FirebaseFirestoreSwift', '7.2-beta'
```
init firebase in the apps initializer
follow twitter auth documentation
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.
#### Relevant Code:
```
var provider = OAuthProvider(providerID: "twitter.com")
func signIN(){
provider.getCredentialWith(nil) { credential, error in
if error != nil {
// Handle error.
}
if credential != nil {
Auth().signIn(with: credential) { authResult, error in
if error != nil {
// Handle error.
}
// User is signed in.
// IdP data available in authResult.additionalUserInfo.profile.
// Twitter OAuth access token can also be retrieved by:
// authResult.credential.accessToken
// Twitter OAuth ID token can be retrieved by calling:
// authResult.credential.idToken
// Twitter OAuth secret can be retrieved by calling:
// authResult.credential.secret
}
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.