Yeah she co- wrote it. There was an interview on Billboard explaining the writing process.
Edit:
Quote:
With her help and with Alex's help, we all collectively created this story. And it took a lot of different variations. I think there are three different versions of the verses that were written. But I wrote one thing and then Alex and Rihanna had the idea to turn it into this song about an immigrant story, coming to this country as an outsider. ... That was her idea, really, hers and Alex's, to turn it into that kind of song.
It really was made so much more powerful by what she contributed to the songwriting and the performance of the song.