nuxt-auth-utils
nuxt-auth-utils copied to clipboard
Mixed use of ofetch and $fetch
While reading the codebase (to potentially implement #89, most likely based on the existing Keycloak provider) I noticed that some places use ofetch and others use $fetch. Is there a specific reason for this? Otherwise it might be wise to unify them and use one of the two consistently throughout the codebase.
$fetch = ofetch ref: https://nuxt.com/docs/getting-started/data-fetching#fetch
TLDR from the link;
Nuxt includes the [ofetch](https://github.com/unjs/ofetch) library, and is auto-imported as the $fetch alias globally across your application.
If this answers your questions, feel free to close the issue.
I knew that $fetch is at least some wrapper over ofetch. However, if there is no difference, I would reason that only one of the two should be used consistently throughout the codebase
I am happy to move everything to $fetch.
Anyone happy to open a PR for this? 🙏