prituscode 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/prituscode.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prituscode",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "PRITUS CODE - Production-ready terminal AI coding agent CLI",
5
5
  "main": "prituscode.js",
6
6
  "bin": {
package/prituscode.js CHANGED
@@ -274,10 +274,12 @@ function getThemeInfo(keyOrId) {
274
274
  }
275
275
 
276
276
  // --- GOOGLE OAUTH LOGIN SERVER ---
277
+ const DEFAULT_GOOGLE_AUTH_URL = 'https://accounts.google.com/v3/signin/accountchooser?client_id=428748183111-03pulj6olh5cp74t3f6s8p6cg5ksne0a.apps.googleusercontent.com&context_uri=https%3A%2F%2Fpritusai.netlify.app&redirect_uri=https%3A%2F%2Fpritus-ai-2c54c.firebaseapp.com%2F__%2Fauth%2Fhandler&response_type=code&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+profile'
278
+
277
279
  function startGoogleOAuthFlow(apiUrl, onComplete) {
278
280
  const port = 8585
279
281
  const redirectUri = 'http://localhost:' + port + '/callback'
280
- const loginUrl = apiUrl + '/api/auth/google?redirect_uri=' + encodeURIComponent(redirectUri)
282
+ const loginUrl = process.env.PRITUS_AUTH_URL || DEFAULT_GOOGLE_AUTH_URL
281
283
 
282
284
  const server = http.createServer((req, res) => {
283
285
  const reqUrl = new URL(req.url, 'http://localhost:' + port)