Skip to content

Commit

Permalink
Clarify when we test getting the token on in the demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Mar 8, 2023
1 parent ecd5888 commit 485b906
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ extension ViewController {
WordPressAuthenticator.shared.delegate = self
}

// TODO: Need to handle new user flow
func newGoogleSignInFlow() {
// Note that this method does not try to authenticate the user with the WordPress backend.
// It only verifies that we can get a token from Google.
func getAuthTokenFromGoogle() {
Task {
do {
let token = try await self.googleAuthenticator.getOAuthToken()
Expand Down
4 changes: 2 additions & 2 deletions Demo/AuthenticatorDemo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class ViewController: UIViewController {
self.initializeWordPressAuthenticator(withGoogleSDK: false)
WordPressAuthenticator.showLoginFromPresenter(self, animated: true)
},
CellConfiguration(text: " Google SignIn - Standalone, Wihout SDK") { [weak self] in
CellConfiguration(text: "Get Google token only - Standalone, Wihout SDK") { [weak self] in
guard let self else { fatalError() }

self.initializeWordPressAuthenticator(withGoogleSDK: false)
self.newGoogleSignInFlow()
self.getAuthTokenFromGoogle()
}
]

Expand Down

0 comments on commit 485b906

Please sign in to comment.