Skip to content

Latest commit

 

History

History
92 lines (59 loc) · 4.43 KB

early-access.md

File metadata and controls

92 lines (59 loc) · 4.43 KB

Use Case 1: Early Access

Watch the video

Introduction

This document outlines the steps required to test out the Early Access use case in our demo project. Early Access is a use case that allows select users to access and test new features before they are fully released.

Prerequisites

Before implementing the Early Access use case, ensure you have:

Implementation Steps

Follow the steps below to implement the Early Access use case in our demo React app:

1. Configure Your Auth0 Application

Get Your Application Keys

  • When you signed up for Auth0, a new application was created for you, or you could have created a new one. You will need some details about that application to communicate with Auth0. You can get these details from the Application Settings section in the Auth0 dashboard.

Add keys to .env.local file

  • In the root directory of your project copy the .env.local.example file to .env.local and add the following environment variables:
AUTH0_SECRET='use [openssl rand -hex 32] to generate a 32 bytes value'
AUTH0_BASE_URL='http://localhost:3000'
AUTH0_ISSUER_BASE_URL='https://{yourDomain}'
AUTH0_CLIENT_ID='{yourClientId}'
AUTH0_CLIENT_SECRET='{yourClientSecret}'

Create Sample Users


2. Configure Your DevCycle Project

Create a New Project

  • In the DevCycle Dashboard, create a new project. Name the project some variation of Use Cases

Create a New Feature

  • In this new project, create a new Release feature (boolean) and name it early-access

Create Targeting Rules

  • In the Users & Targeting rules for your Development environment, create three targeting rules (in order):
    • Developers: set initial serve value to Variation On
    • Beta Users: set initial serve value to Variation Off
    • All Users: set initial serve value to Variation Off

Add SDK key to .env file

  • Select the key icon (View API Keys) in the main navbar, and copy the client key for your Development Environment (it should look like dvcclient****)
  • In the root directory of your project copy the .env.example file to .env and update it with the following environment variable:
NEXT_PUBLIC_DVC_SDK_KEY='{dvc_client_****}'

3. Test Out Early Access Feature

  • Ensure your demo application is running at https://localhost:3000 by following the instructions in the main README.md file.
  • Login as developer@domain1.com using the credentials you created in Step 1, and select the context menu by clicking on your profile image.
    • If the DevCycle SDK has been successfully configured you should see the Profile menu item.
  • Now Login as beta@domain2.com using the credentials you created in Step 1, and select the context menu by clicking on your profile image.
    • If targetting rules have been successfully configured you should not be able to see the Profile menu item.
  • Update the targetting rule for beta users by changing the serve value to Variation On
  • Repeat the above process for user@domain2.com

Notes

  • The Early Access feature flag can also be managed via the DevCycle CLI.
  • Please refer back to the main README.md file for general instructions and contact information if any problems are encountered.