Zoom

Create a Zoom App from Marketplace

  1. Visit Zoom Marketplace.

  2. Hover on the Develop button and select Build App

  3. Select General App and click Create

Configure your Zoom App

Ensure that you are in the Basic Information of your app settings.

  1. Under Select how the app is managed, choose User-managed

  2. Under App Credentials, copy your Client ID and Client Secret and store them in a safe location

  3. Under OAuth Information -> OAuth Redirect URL, add your Callback URL. For example,

    http://localhost:3000/api/auth/callback/zoom

       <Callout>
         For production, you should set it to the URL of your application. If you change the base
         path of the auth routes, you should update the redirect URL accordingly.
       </Callout>

    Skip to the `Scopes` section, then

    1. Click the `Add Scopes` button
    2. Search for `user:read:user` (View a user) and select it
    3. Add any other scopes your applications needs and click `Done`
  </Step>

  <Step>
    ### Configure the provider

    To configure the provider, you need to import the provider and pass it to the `social_providers` option of the auth instance.

    ```ruby title="config/auth.rb"
require "better_auth"

auth = BetterAuth.auth(
  secret: ENV.fetch("BETTER_AUTH_SECRET"),
  base_url: ENV.fetch("BETTER_AUTH_URL", "http://localhost:3000"),
  social_providers: {
    zoom: BetterAuth::SocialProviders.zoom(
      client_id: ENV.fetch("ZOOM_CLIENT_ID"),
      client_secret: ENV.fetch("ZOOM_CLIENT_SECRET")
    )
  }
)

Sign In with Zoom

To sign in with Zoom, call auth.api.sign_in_social on your Ruby auth instance. You will need to specify zoom as the provider.

server.rb
response = auth.api.sign_in_social(
body: {
provider: "zoom",
callback_url: "/dashboard",
error_callback_url: "/login",
disable_redirect: true
}
)

redirect_url = response.fetch(:url)

On this page