Following the example usage, GKAuthenticationView has three closures: state, failed, and authenticated. However, putting this example code into a SwiftUI view results in an error "Extra trailing closure passed in call" on the "failed:" line. Using
GKAuthenticationView(failed: { error in ...}, authenticated: { player in ...}
appears to work just fine.