Uncodie
Technical DocumentationNo CodeTutorialsChangelogDisccord
Developers
Developers
  • 📖Documentation
    • Basic Concepts
      • Node JS
      • React
      • Postgres SQL
      • GraphQL
      • Git
      • API
  • 🔌API
    • Getting Started
      • Credentials
    • Users
      • Register User
    • Component Interface
      • Props
  • 🤖IDE
    • Getting started
    • Component View
      • CSS
      • Controller
      • Component
    • Compiler
    • Importing Code
      • Scripts
        • Manifest
      • Connectors
        • Manifest
      • Components
        • Manifest
    • Exporting Code
      • Design Systems
        • Custom React libraries
      • Guidelines
  • ⚙️Figma Plugin
    • Variables
      • Global Variables
      • Local Variables
      • Route Variables
      • Session Context
      • Window Variables
    • Actions
      • GraphQL Trigger
      • Refresh Query
      • Set Variable
      • Select and Navigate
  • 🎛️Settings
    • User Authentication
    • Git
    • External Deployment
    • Version Control
    • External DB Setup
    • SEO
Powered by GitBook
On this page
  • Setup
  • Machine 2 Machine autentication
  • Setup
  • Environment variables

Was this helpful?

  1. Settings

User Authentication

In the user access section you can configure the integration of Auth0 to your project to give security to your application or website

PreviousSelect and NavigateNextGit

Last updated 1 year ago

Was this helpful?

Setup

  1. Create an account

  2. Create an app

  3. Setup your tenant

  4. On auth0 navigate to your tenant and go to actions, copy the next code using your project_id

const axios = require('axios').default;

const accessKeyId = 'ACCESSKEYID' // Your access key id provide by App Uncodie.
const accessKeySecret = 'ACCESSKEYSECRET' // Your access key secret provide by App Uncodie.

/
function that store user on project database.
*
@param {object} user - The user being created
*/
const addUser = async (user)=>{
  const project_id = 709 // Id of the project where you want to store the new user, You can obtain it from the route in the URL by selecting your project within the App.
  return axios({
    method: 'post',
    url: 'https://dev.api.uncodie.com/project/create/user',
    headers: {
      "Content-Type": "application/json",
      "accessKeyId": accessKeyId,
      "accessKeySecret": accessKeySecret
    },
    data: {
      "project_id": project_id,
      "email": user.email,
      "name": user.given_name ? user.given_name : user.email,
      "image_url": user.picture,
      "collection": "users" // Collection where users are stored. 'users' is provided by Uncodie, if you have another one, replace it with that.
    }
  })

This code will use the register user API endpoint to add a new user to your data base, for more information see:

  1. Setup your credentials in Uncodie as follows:

Domain

This data is the domain assigned to your app in Auth0, this can be your tenant's auth0 subdomain, or your own CNAME for the external login and authentication, for example:

login.yourdomain.com

Client ID

This data is the client ID assigned by Auth0 to your app in Auth0

Secret

This data is the secret assigned by Auth0 to your app in Auth0

Machine 2 Machine autentication

Use the Auth0 environment variables to grant access to your backend to your auth0 tenant´s information.

Setup

  1. Set your auth0 basic configuration

  2. Navigate to app.uncodie.com and select your project

  3. Inside your Environment Variables add the next Key Pairs:

Environment variables

To update user data it is necessary to configure the following parameters

SERVER_AUTH0_DOMAIN

SERVER_AUTH0_CLIENT_ID

SERVER_AUTH0_CLIENT_SECRET

For more information and documentation for Auth0 also check:

🎛️
Register User
Auth 0
Auth0 React SDK Quickstarts: LoginAuth0 Docs
Auth0 APIsAuth0 Docs
Logo
Logo