Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get baseAPI when use customIdentityProvider #86

Open
cydd007 opened this issue Dec 8, 2023 · 0 comments
Open

How to get baseAPI when use customIdentityProvider #86

cydd007 opened this issue Dec 8, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@cydd007
Copy link

cydd007 commented Dec 8, 2023

customIdentityProvider() {
const baseAPI = '' //////what is this value????
const userId = '30317220-c72d-11ed-2137-0242ac120002'

	        const getToken = async () => {
	          const response = await fetch(`${baseAPI}/getToken/${userId}`)
	
	          const token = await response.json()
	          console.log('getToken', token)
	          return token
	        }
	
	        const getFreshToken = async () => {
	          const response = await fetch(`${baseAPI}/getFreshToken/${userId}`)
	
	          const token = await response.json()
	          console.log('getFreshToken, token')
	          return token
	        }
	
	        const hasToken = async () => {
	          const response = await fetch(`${baseAPI}/hasToken/${userId}`)
	          const data = await response.json()
	          return data
	        }
	
	        const invalidateToken = async () => {
	          const response = await fetch(`${baseAPI}/invalidate/${userId}`)
	          const data = await response.json()
	          console.log(data)
	        }
	
	        return {
	          getToken,
	          getFreshToken,
	          hasToken,
	          invalidate: invalidateToken,
	        }
	      },
@cydd007 cydd007 added the enhancement New feature or request label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants