リクエストごとにリフレッシュする設定を加えているのですが、なぜか空でリターンされることが有りました

調べてみると、どうやらリフレッシュされないときはそもそも更新していないから らしいです

https://github.com/lynndylanhurley/devise_token_auth/issues/1147#issuecomment-415195924

一応設定のファイル(initializers/devise_token_auth )を確認したら、同じタイミングでAPIにリクエストする必要がある場合も有りますと、その場合は同じtokenでリクエストOKです、的なことが書いてます。

おそらく設定を加えたら色々とできるんでしょうけど、多分デフォルトでは10.seconds なんだと思います

# Sometimes it's necessary to make several requests to the API at the same
# time. In this case, each request in the batch will need to share the same
# auth token. This setting determines how far apart the requests can be while
# still using the same auth token.
# config.batch_request_buffer_throttle = 10.seconds

参考記事

https://github.com/lynndylanhurley/devise_token_auth/issues/1147#issuecomment-415195924

コメントをどうぞ

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

CAPTCHA