Allah has promised to forgive all sins with the exception of associating a partner with Him (shirk). The only condition for a sin to be forgiven is sincerity. If a person is sincere in their repentance, meaning that they do not go back to the same sin, then that is a sign that Allah has forgiven them. Allah knows best.