The first step is to build a URL you can redirect a user to for authentication.
You need the following components-
- response type
- scopes
- redirect uri
- client id
Scopes
The list of all following scopes is as follows-
user
- A grouped scope. This scope automatically adds any scope prefixed with user:
to your scopes list.
user:recentrepls
- View a user's recent repls
user:notifications
- View a user's notifications
user:id
- Get the user's ID
user:username
- Get the user's username
user:name
- Get the user's name, if they have one set
user:bio
- Get the user's bio
user:isVerified
- Check if the user's email is verified
user:timeCreated
- Get a datetime string of their account creation
user:repls
- Get a user's repls
user:languages
- Get the user's used languages
user:markNotificationsAsRead
- Mark a user's notifications as read
repl
- A grouped scope. This scope automatically adds any scope prefixed with repl:
to your scopes list.
repl:update
- Change a repl's metadata
repl:delete
- Delete a repl
repl:boost
- Boost a repl
repl:unboost
- Unboost a repl
repl:create
- Create a repl
repl:publish
- Publish a repl
repl:unpublish
- Unpublish a repl
Redirect URI
If your redirect URI is added to the list of URIs on the Replit Oauth dashboard, it will be allowed.
Client ID
The client ID for a specific app can be found on the dashboard.
scopes = ['user']
redirect_uri = "url"
clientid = 0000000000
url = f"https://replit-oauth.coolcodersj.repl.co/authorize?response-type=code&scopes={"+".join(scopes)}&redirect-uri={redirect_uri}&clientid={clientid}"