-
1
What are JWT tokens and where are they stored (client side or server side)? HowTimes asked 2Official solution
SimpleJWT teen tukde ki signed chitthi: header.payload.signature. Padhi ja sakti hai, badli nahi ja sakti.
Encoded (Base64) + signed, encrypted nahi (JWE alag). Payload mein password mat daalo — koi jwt.io pe dekh lega.
Login pe server secret se HMAC (HS256). Har API
Authorization: Bearer <token>.
Expiryexp. Change payload → signature fail → 401.Session MAD1 server yaad rakhta. JWT MAD2 client rakhta, server stateless-ish.
Example
eyJhbGciOiJIUzI1NiJ9.{"sub":1,"role":"admin"}.signature # Authorization: Bearer <token>Project example: POST /login → token LS. fetch interceptor header. @jwt_required APIs.
Viva tipAlgo HS256. Secret env var. jwt.io pe payload dikhao, secret public site pe mat paste.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
2
What are other authentication methods besides JWT?Times asked 2Official solution
SimpleAuthentication: tu kaun hai? (login). Authorization: tujhe permission hai? (role check).
Example
# auth if check_password_hash(user.password, pwd): session['user_id'] = user.id # authz if user.role != 'admin': abort(403)Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
3
What are alternatives to Local Storage for storing tokens (Sessions, Cookies)?Times asked 2Official solution
SimpleMAD1 mein usually session-based auth: login pe session['user_id'], har request pe verify.
Example
session['user_id'] = user.id uid = session.get('user_id') user = User.query.get(uid)Viva tipSECRET_KEY set karo warna session insecure. logout pe session.clear().
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
4
Explain the complete flow of a user action with code.Times asked 2Official solution
SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.
Viva tipFunction signature + 3-4 important lines + edge case.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
5
Explain a Vue component and how it is mapped to a URL.Times asked 2Official solution
SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.
Viva tipFunction signature + 3-4 important lines + edge case.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
6
After showing a particular line of code, which line runs next?Times asked 2Official solution
SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.
Suggested flow1) Concept kya hai?
2) Mere code mein kahan?
3) Example / demo
4) Edge caseExample
# related file: models.py / routes / template # formula: request → check/auth → DB → render/redirectViva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
7
What happens if cascade="delete-orphan" is not used?Times asked 2Official solution
SimpleCascade parent delete pe children pe kya ho: delete-orphan related rows hata deta hai.
Example
db.relationship('Spot', cascade='all, delete-orphan')Viva tipParking lot delete → uske spots/bookings policy clear bolo.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
8
Add a Confirm Password field to the registration form and prevent registration if the passwords do not match.Times asked 2Official solution
SimpleORM = Object Relational Mapping. Tables → Python classes. Raw SQL kam likhte ho.
Example
class User(db.Model): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(120), unique=True) User.query.get(5) # SELECT ... WHERE id=5Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
9
Remove the id column from the exported CSV file.Times asked 2Official solution
SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.
Example
/* button red */ .btn-primary { background: red; } /* center navbar item */ .navbar { justify-content: center; }Viva tipDevTools se pehle try, phir file mein permanent change.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet