my-cloud-devops-consulting 1.1.202507211825__py3-none-any.whl → 1.1.202507212139__py3-none-any.whl

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.
app.py CHANGED
@@ -5,7 +5,7 @@ from urllib.parse import quote_plus
5
5
  from bson.objectid import ObjectId
6
6
  import os
7
7
  from flask_login import LoginManager,login_user,UserMixin,login_required,logout_user,current_user
8
- from settings import SECRET_KEY,MONGO_URI, EMAIL_USER, MONGO_PASSWORD, MONGO_USERNAME
8
+ from settings import SECRET_KEY,MONGO_URI, EMAIL_USER, MONGO_PASSWORD, MONGO_USERNAME, COGNITO_CLIENT_ID, COGNITO_CLIENT_SECRET
9
9
  from utils import send_email, get_videos
10
10
  from werkzeug.middleware.proxy_fix import ProxyFix
11
11
 
@@ -270,24 +270,13 @@ oauth = OAuth(app)
270
270
  oauth.register(
271
271
  name='oidc',
272
272
  authority='https://cognito-idp.us-east-1.amazonaws.com/us-east-1_TZVykdVvG',
273
- client_id='1lc7qso1g3lr9kqbr0nb0jktbs',
274
- client_secret='1f1qa6rf66549cta1uqpamjpjqt06ne3agvlgou638e56kmt8dve',
273
+ client_id= COGNITO_CLIENT_ID,
274
+ client_secret=COGNITO_CLIENT_SECRET,
275
275
  server_metadata_url='https://cognito-idp.us-east-1.amazonaws.com/us-east-1_TZVykdVvG/.well-known/openid-configuration',
276
276
  client_kwargs={'scope': 'phone openid email'}
277
277
  )
278
278
  ################################################
279
279
 
280
- # Configure a login route to direct to Amazon Cognito managed login for authentication with a redirect to an authorize route.
281
- # @app.route('/login/cognito')
282
- # def login_cognito():
283
- # session.pop('user', None)
284
- # redirect_uri = url_for('authorize', _external=True)
285
- # print("🧭 Redirect URI being used:", redirect_uri) # <--- add this
286
- # return oauth.oidc.authorize_redirect(
287
- # redirect_uri,
288
- # prompt='login'
289
- # )
290
-
291
280
  @app.route('/login/cognito')
292
281
  def login_cognito():
293
282
  session.pop('user', None)
@@ -316,23 +305,6 @@ def authorize():
316
305
  return redirect(url_for('home')) # ✅ Fixed: 'home' matches your defined route
317
306
 
318
307
 
319
- # Configure a logout route that erases user session data.
320
- # @app.route('/logout/cognito')
321
- # def logout_cognito(): # ✅ Renamed to avoid conflict
322
- # session.pop('user', None)
323
- # return redirect(url_for('home')) # 🔁 Also change to 'home' if 'index' doesn't exist
324
-
325
- # @app.route('/logout/cognito')
326
- # def logout_cognito():
327
- # session.pop('user', None)
328
-
329
- # cognito_domain = 'https://us-east-1tzvykdvvg.auth.us-east-1.amazoncognito.com'
330
- # client_id = '1lc7qso1g3lr9kqbr0nb0jktbs' # Make sure this matches your App Client ID
331
- # logout_redirect_uri = url_for('home', _external=True)
332
-
333
- # return redirect(
334
- # f"{cognito_domain}/logout?client_id={client_id}&logout_uri={logout_redirect_uri}"
335
- # )
336
308
 
337
309
 
338
310
  from flask import request
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: my-cloud-devops-consulting
3
- Version: 1.1.202507211825
3
+ Version: 1.1.202507212139
4
4
  Summary: This is my consulting website for Cloud & DevOps services.
5
5
  Home-page: https://github.com/Betrand1999/project-root
6
6
  Author: Betrand Mutagha
@@ -0,0 +1,5 @@
1
+ app.py,sha256=4ramdykHSF3sCq6pMKYmTK31cY0qMECIkobqGibBGNI,11298
2
+ my_cloud_devops_consulting-1.1.202507212139.dist-info/METADATA,sha256=4YA6rDJpi4EvGqZPm6NAR31N3rcq6XCIy0mhDwOSYfI,785
3
+ my_cloud_devops_consulting-1.1.202507212139.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
4
+ my_cloud_devops_consulting-1.1.202507212139.dist-info/top_level.txt,sha256=io9g7LCbfmTG1SFKgEOGXmCFB9uMP2H5lerm0HiHWQE,4
5
+ my_cloud_devops_consulting-1.1.202507212139.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- app.py,sha256=aXPXa9ph0pzOKJoPAGzRxkrXanC3tQo-zX9_ry6P09E,12468
2
- my_cloud_devops_consulting-1.1.202507211825.dist-info/METADATA,sha256=NgDR-gSFg_BsK6aMhCvMrf_59qd7SG7QpO8wfIHPCyM,785
3
- my_cloud_devops_consulting-1.1.202507211825.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
4
- my_cloud_devops_consulting-1.1.202507211825.dist-info/top_level.txt,sha256=io9g7LCbfmTG1SFKgEOGXmCFB9uMP2H5lerm0HiHWQE,4
5
- my_cloud_devops_consulting-1.1.202507211825.dist-info/RECORD,,