Quickstart Guide

Quickstart Guide

Get up and running with Skycloak in just 5 minutes. This guide will walk you through creating your first cluster, setting up an application, and implementing authentication.

Prerequisites

  • A Skycloak account (Sign up free)
  • Basic knowledge of OAuth 2.0/OIDC
  • Your application ready to integrate

Step 1: Create Your First Cluster (2 minutes)

  1. Log in to your Skycloak dashboard
  2. Click “Create Cluster” button
  3. Choose your configuration:
    • Name: my-first-cluster
    • Environment: Development
    • Location: Choose nearest to you
    • Size: Start with Small
  4. Click “Create” - your cluster will be ready in ~30 seconds

Step 2: Create an Application (1 minute)

  1. Navigate to Applications in your cluster
  2. Click “Create Application”
  3. Follow the wizard:
    • Type: Choose your app type (SPA, Web App, etc.)
    • Technology: Select your framework
    • Name: my-app
    • Redirect URI: http://localhost:3000/callback
  4. Click “Create”

You’ll receive:

  • Client ID: your-client-id
  • Client Secret: your-client-secret (if confidential)
  • Issuer URL: https://your-cluster-id.app.skycloak.io/realms/default

Step 3: Quick Integration (2 minutes)

React Example

npm install react-oidc-context oidc-client-ts
// App.js
import { AuthProvider } from 'react-oidc-context';

const oidcConfig = {
  authority: 'https://your-cluster-id.app.skycloak.io/realms/default',
  client_id: 'your-client-id',
  redirect_uri: 'http://localhost:3000/callback',
  scope: 'openid profile email',
};

function App() {
  return (
    <AuthProvider {...oidcConfig}>
      <YourApp />
    </AuthProvider>
  );
}
// LoginButton.js
import { useAuth } from 'react-oidc-context';

function LoginButton() {
  const auth = useAuth();

  if (auth.isAuthenticated) {
    return (
      <div>
        Welcome {auth.user?.profile.email}!
        <button onClick={() => auth.signoutRedirect()}>Logout</button>
      </div>
    );
  }

  return <button onClick={() => auth.signinRedirect()}>Login</button>;
}

Node.js Example

npm install express express-session passport passport-openidconnect
const express = require('express');
const passport = require('passport');
const { Strategy } = require('passport-openidconnect');

passport.use(
  new Strategy({
    issuer: 'https://your-cluster-id.app.skycloak.io/realms/default',
    authorizationURL:
      'https://your-cluster-id.app.skycloak.io/realms/default/protocol/openid-connect/auth',
    tokenURL:
      'https://your-cluster-id.app.skycloak.io/realms/default/protocol/openid-connect/token',
    userInfoURL:
      'https://your-cluster-id.app.skycloak.io/realms/default/protocol/openid-connect/userinfo',
    clientID: 'your-client-id',
    clientSecret: 'your-client-secret',
    callbackURL: 'http://localhost:3000/callback',
    scope: 'openid profile email',
  })
);

app.get('/login', passport.authenticate('openidconnect'));
app.get(
  '/callback',
  passport.authenticate('openidconnect', {
    successRedirect: '/',
    failureRedirect: '/login',
  })
);

What’s Next?

Congratulations! You’ve successfully:

  • ✅ Created a Skycloak cluster
  • ✅ Configured your first application
  • ✅ Implemented authentication

Next Steps

  1. Add Users - Create test users and manage access
  2. Customize Branding - Match your app’s look and feel
  3. Explore Integrations - Deep dive into your framework
  4. Configure MFA - Add extra security

Common Next Tasks

Need Help?


Pro Tip: Enable debug mode in your application to see detailed authentication logs in the Logs Viewer.