detector flashcan
The current of back biased diode depends on light energy coming to its sensing side. Also diode dark current will depend on temperature and varies a lot .
Trying to use same sensor for flash and sun illumination detection means at some extend the amplifier should support wide input current range from diode and be not excited at same time.
The flash can be detected by differentiating the photodiode amplifier output (simple rc circuit).
I would go with transimpedance amplifier (that depends on your strict requirements which you dont know yet) with low gain first and then additional amplifier for sun illumination level detection. Differentiate the output from first amplifier and detect it with threshold tune comparator.
Low gain transimpedance is needed to prevent amplifier from excitation when diode is maximum radiated under the sun , dark current (when exposed to highest possible temperature) is maximum and there will still be room for flash detection.
Pay attention to opamp offset vs temperature and photodiode current vs temperature .
What is the pin diode id you own? BPW34 is nice one for such things.