Zoom
Create a Zoom App from Marketplace
-
Visit Zoom Marketplace.
-
Hover on the
Developbutton and selectBuild App -
Select
General Appand clickCreate
Configure your Zoom App
Ensure that you are in the Basic Information of your app settings.
-
Under
Select how the app is managed, chooseUser-managed -
Under
App Credentials, copy yourClient IDandClient Secretand store them in a safe location -
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.
response = auth.api.sign_in_social(
body: {
provider: "zoom",
callback_url: "/dashboard",
error_callback_url: "/login",
disable_redirect: true
}
)
redirect_url = response.fetch(:url)