okta / okta-mobile-swift

okta-mobile-swift
https://github.com/okta/okta-mobile-swift
Apache License 2.0
44 stars 19 forks source link

Setting graceInterval with credential.authorize(&request) #136

Closed pxmal closed 1 year ago

pxmal commented 1 year ago

Describe the feature request?

I would like to set a custom graceInterval when using credential.authorize(&request) when refreshing the tokens and authorizing the request, which is currently possible in the refreshIfNeeded func.

Otherwise - should I perhaps just overwrite the global Credential.refreshGraceInterval with my own value?

New or Affected Resource(s)

Credential class

Provide a documentation link

No response

Additional Information?

No response

pxmal commented 1 year ago

I needed a do/try/catch of the credential.authorize(&request) for error handling that credential.authorize(&request) doesn't have, so I just opted to using the refreshIfNeeded(graceInterval:) and the credential.authorize(request: &request).