elsesiy / GAppAuth

Convenient Wrapper for AppAuth with Google Services written in Swift (>= 4).
BSD 2-Clause "Simplified" License
34 stars 9 forks source link

Subscribe to token change events? #14

Closed gazzer82 closed 3 years ago

gazzer82 commented 4 years ago

I am using this in an iOS app, and need to be updated when the token is refreshed.

I see there are the GAppAuth.shared.stateChangeCallback and GAppAuth.shared.errorCallback, but I can't quit work out how to use them.

Does anyone have any pointers?

Thanks

Gareth

elsesiy commented 3 years ago

@gazzer82 These are standard swift callbacks e.g.

GAppAuth.shared.stateChangeCallback = { state -> Void in

}

GAppAuth.shared.errorCallback = { state, err -> Void in

}

Please let me know if this doesn't answer the question, thanks!