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

調べてみると、どうやらリフレッシュされないときはそもそも更新していないから
らしいです
一応設定のファイル(initializers/devise_token_auth
)を確認したら、同じタイミングでAPIにリクエストする必要がある場合も有りますと、その場合は同じtokenでリクエストOKです、的なことが書いてます。
おそらく設定を加えたら色々とできるんでしょうけど、多分デフォルトでは10.seconds
なんだと思います
1 2 3 4 5 | # 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 |