0

I am using the BuildFire user database.

Using the Public API from an external service, I need to validate that the user is logged in and that they are a subscriber. I have the currentUser's access token.

This works to validate the token:

https://public.buildfire.com/1.0/auth/verify_credentials?access_token={TOKEN}

If the token is valid, the request returns a partial user object:

{
    "user_id": "62d59708df0fd803aa64251b",
    "created_on": "2022-07-18T17:23:20.793Z",
    "is_active": true,
    "failed_attempt_count": 0,
    "last_access": "2022-07-19T17:08:48.270Z",
    "display_name": "",
    "last_name": "",
    "username": "bill@microsoft.com",
    "first_name": "",
    "email": "bill@microsoft.com",
    "last_updated": "2022-07-19T17:10:27.143Z"
}

Validate user is logged in: DONE

QUESTION:

What is the recommended way to determine if this user is a subscriber?

jambrose
  • 2,553
  • 1
  • 13
  • 9

1 Answers1

0

I think this is a little bit different than the traditional use. Generally, the app will use SSO to use your backend system User Authorization/Authentication. Your system returns back an Access Token to BuildFire. Than when you webview some content in from your server, BuildFire passes you along the AccessToken for you to re-authenticate. If this is a viable option than this is your best option.

However, if the option above isnt viable then you can use BuildFire Gateway to call from your server over to BuildFire's auth servers. You'll need an API Key that may or may not be part of your plan. Here is the documentation you need https://sdk.buildfire.com/AWSGatewayPublicAPI/

Daniel_Madain
  • 491
  • 4
  • 9