Forum Discussion
@rpatrick00 The Account#connect()
method returns a Generic Type, and can be used to return an authentication String, a Session or Connection object etc. to the Snap code. An example can be found in the Account Configuration section of our Developer Documentation.
For a ValidateableAccount
, which simply extends Account
, the connect()
method is called when the “Validate” button in the Account Settings UI is clicked. Your observation is correct that the return value isn’t used for Account validation, what matters is whether or not the connect()
method returns successfully. The validation is considered successful if a value was returned, and validation fails if the call throws an Exception. You can find more information in the Validating Accounts section.