Skip to content

How to use Nhost Vanilla with Service workers or Extension Background script? #2493

Answered by dbarrosop
caudurodev asked this question in Q&A
Discussion options

You must be logged in to vote

You have a few options when using the js SDK:

  • disable autoSignin and autoRefreshToken
  • implement your own custom clientStorage

You have more details about those here: https://docs.nhost.io/reference/javascript/auth/types/nhost-auth-constructor-params

Then you can leverage setAccessToken inside the graphql and storage options if you are planning to use those.

If the SDK doesn't provide the flexibility you need/want you can also perform HTTP requests directly to the services. You can find information about the endpoints here: https://docs.nhost.io/reference/auth/sign-up-email-and-password

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@caudurodev
Comment options

Answer selected by caudurodev
Comment options

You must be logged in to vote
2 replies
@caudurodev
Comment options

@onehassan
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants