Heat oil in a medium saucepan.
Add onions, and cook until golden brown (stirring often).
Add garlic, ginger, curry powder, red pepper flakes and cook until fragrant.
Add lentils and cook for about 1 minute (stirring often).
Add tomatoes, water and coconut milk and bring to a boil.
Reduce heat and simmer, stirring occasionally, until lentils are cooked.
Add chopped mango and cook for another 7 minutes on low.
Season with salt and pepper.Serve with jasmine rice (optional) and garnish with cilantro and lime wedges.