How to keep OAuth alive




  • SalsaShark42

    When they authenticate, you'll get an auth token and a refresh token via the redirect URI.  You can bank that in a keystore.  The next time your app needs to establish a Box connection, use the tokens from the keystore.  When successfully authenticated, you'll get a fresh pair of tokens that you can sock away for next time.  The refresh token is good for 60 days--if you go longer than that, then you'll have to go through the manual authentication process again.  Depending on which SDK you're using, you can provide keystore functions that will be automatically called when your token expires (they last an hour).

    コメントアクション Permalink