This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// AuthLWA with AWSMobileClient using Federated Identities | |
// | |
// Created by Hills, Dennis on 4/26/19. | |
// Copyright © 2019 Hills, Dennis. All rights reserved. | |
// | |
// Requires LoginWithAmazonProxy via Gist here: https://gist.github.com/mobilequickie/56916503a41ebb2374fea241ede26eab | |
// This gist: https://gist.github.com/mobilequickie/47a238e073043a271425f7ffe9d56d5e | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
platform :ios, '11.0' | |
target 'AuthLWA' do | |
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks | |
use_frameworks! | |
# Pods for Auth | |
pod 'AWSMobileClient', '~> 2.9.0' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { | |
return AIMobileLib.handleOpen(url, sourceApplication: UIApplication.OpenURLOptionsKey.sourceApplication.rawValue) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LoginWithAmazonProxy.swift | |
// | |
// Created by Hills, Dennis on 4/26/19. | |
// Copyright © 2019 Hills, Dennis. All rights reserved. | |
// | |
// Original credit to SUPERDASHENG at https://superdasheng.wordpress.com/author/superdasheng/ | |
// Added logout, getAccessToken, and getUserProfile | |
// https://gist.github.com/mobilequickie/56916503a41ebb2374fea241ede26eab | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// AuthLWA | |
// | |
// Created by Hills, Dennis on 4/26/19. | |
// Copyright © 2019 Hills, Dennis. All rights reserved. | |
// | |
// Requires LoginWithAmazonProxy.swift from here: https://gist.github.com/mobilequickie/56916503a41ebb2374fea241ede26eab | |
// Gist: https://gist.github.com/mobilequickie/346caccc2a07f18e2bea4fdf6fe8fd3f | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<key>CFBundleURLTypes</key> | |
<array> | |
<dict> | |
<key>CFBundleURLSchemes</key> | |
<array> | |
<string>com.googleusercontent.apps.###########-xxxxxxxxxxxxxxxxxxxxxxxxxxxx</string> | |
</array> | |
</dict> | |
</array> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uncomment the next line to define a global platform for your project | |
# platform :ios, '11.0' | |
target 'GoogleAuth' do | |
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks | |
use_frameworks! | |
# Pods for BasicandGoogleSignIn | |
pod 'AWSMobileClient' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uncomment the next line to define a global platform for your project | |
# platform :ios, '11.0' | |
target '<YOURPOJECTNAMEHERE>' do | |
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks | |
use_frameworks! | |
# Pods for BasicandFBAuth | |
pod 'AWSMobileClient' | |
pod 'AWSFacebookSignIn' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import AWSMobileClient //#1 | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import AWSAuthCore | |
import AWSAuthUI | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
showSignIn() |